-
Notifications
You must be signed in to change notification settings - Fork 66
EPMRPP-100452 || refactor exception handling #2246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
reviewdog
src/main/java/com/epam/ta/reportportal/exception/rest/DefaultErrorResolver.java|116| Line continuation have incorrect indentation level, expected level should be 4.
src/main/java/com/epam/ta/reportportal/exception/rest/RestError.java|29 col 56| Abbreviation in name 'errorRS' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/ta/reportportal/exception/rest/RestError.java|31| First sentence of Javadoc is missing an ending period.
src/main/java/com/epam/ta/reportportal/exception/rest/RestError.java|63 col 5| Missing a Javadoc comment.
src/main/java/com/epam/ta/reportportal/exception/rest/RestError.java|64 col 15| Abbreviation in name 'errorRS' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/ta/reportportal/exception/rest/ReportPortalExceptionResolver.java|25| First sentence of Javadoc is missing an ending period.
src/main/java/com/epam/ta/reportportal/exception/rest/ReportPortalExceptionResolver.java|43| Line is longer than 100 characters (found 118).
src/main/java/com/epam/ta/reportportal/ws/controller/ErrorHandlingController.java|28 col 1| Missing a Javadoc comment.
src/main/java/com/epam/ta/reportportal/ws/controller/ErrorHandlingController.java|56 col 3| Missing a Javadoc comment.
* You should have received a copy of the GNU Lesser General Public License | ||
* along with Report Portal. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package com.epam.ta.reportportal.exception.forwarding; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'package' should be separated from previous line.
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.client.ClientHttpResponse; | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First sentence of Javadoc is missing an ending period.
private final HttpHeaders headers; | ||
private final HttpStatus status; | ||
|
||
public ResponseForwardingException(ClientHttpResponse response) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.epam.ta.reportportal.exception.forwarding; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'package' should be separated from previous line.
import org.springframework.stereotype.Service; | ||
import org.springframework.web.servlet.HandlerExceptionResolver; | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First sentence of Javadoc is missing an ending period.
private final com.epam.reportportal.rules.exception.ErrorType error; | ||
private final ExceptionMessageBuilder<T> exceptionMessageBuilder; | ||
|
||
public RestErrorDefinition(HttpStatus httpStatus, ErrorType error, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
import java.util.Optional; | ||
import org.springframework.http.HttpStatus; | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First sentence of Javadoc is missing an ending period.
import org.slf4j.LoggerFactory; | ||
|
||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First sentence of Javadoc is missing an ending period.
|
||
public DefaultErrorResolver( | ||
Map<Class<? extends Throwable>, RestErrorDefinition> exceptionMappingDefinitions) { | ||
Preconditions.checkNotNull(exceptionMappingDefinitions, "Exceptions mappings shouldn't be null"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is longer than 100 characters (found 101).
* @return the template to use for the RestError instance to be constructed. | ||
*/ | ||
private RestErrorDefinition getRestErrorDefinition(Exception ex) { | ||
Map<Class<? extends Throwable>, RestErrorDefinition> mappings = this.exceptionMappingDefinitions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is longer than 100 characters (found 101).
No description provided.