Skip to content

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

grabsefx
Copy link
Contributor

@grabsefx grabsefx commented May 5, 2025

No description provided.

@grabsefx grabsefx self-assigned this May 5, 2025
@grabsefx grabsefx requested a review from pbortnik as a code owner May 5, 2025 07:07
Copy link

@github-actions github-actions bot left a 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;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck> reported by reviewdog 🐶
'package' should be separated from previous line.

import org.springframework.http.HttpStatus;
import org.springframework.http.client.ClientHttpResponse;

/**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.javadoc.SummaryJavadocCheck> reported by reviewdog 🐶
First sentence of Javadoc is missing an ending period.

private final HttpHeaders headers;
private final HttpStatus status;

public ResponseForwardingException(ClientHttpResponse response) throws IOException {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck> reported by reviewdog 🐶
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;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck> reported by reviewdog 🐶
'package' should be separated from previous line.

import org.springframework.stereotype.Service;
import org.springframework.web.servlet.HandlerExceptionResolver;

/**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.javadoc.SummaryJavadocCheck> reported by reviewdog 🐶
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,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck> reported by reviewdog 🐶
Missing a Javadoc comment.

import java.util.Optional;
import org.springframework.http.HttpStatus;

/**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.javadoc.SummaryJavadocCheck> reported by reviewdog 🐶
First sentence of Javadoc is missing an ending period.

import org.slf4j.LoggerFactory;


/**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.javadoc.SummaryJavadocCheck> reported by reviewdog 🐶
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");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
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;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 100 characters (found 101).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant