Skip to content

Commit

Permalink
Log stacktrace for UserNotFoundException
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Jan 31, 2025
1 parent 2e886b6 commit fc49de2
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion account-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openconext</groupId>
<artifactId>myconext</artifactId>
<version>7.4.4</version>
<version>7.4.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>account-gui</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion myconext-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openconext</groupId>
<artifactId>myconext</artifactId>
<version>7.4.4</version>
<version>7.4.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>myconext-gui</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion myconext-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openconext</groupId>
<artifactId>myconext</artifactId>
<version>7.4.4</version>
<version>7.4.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>myconext-server</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public ResponseEntity error(HttpServletRequest request) throws URISyntaxExceptio
statusCode = result.containsKey("status") && (int) result.get("status") != 999 ?
HttpStatus.valueOf((int) result.get("status")) : INTERNAL_SERVER_ERROR;
} else {
if (error instanceof UserNotFoundException) {
LOG.warn(String.format("%s: %s", error.getClass(), error.getMessage()));
} else {
// if (error instanceof UserNotFoundException) {
// LOG.warn(String.format("%s: %s", error.getClass(), error.getMessage()));
// } else {
LOG.error(String.format("Error occurred; %s %s", error.getClass(), error), error);
}
// }
//https://github.com/spring-projects/spring-boot/issues/3057
ResponseStatus annotation = AnnotationUtils.getAnnotation(error.getClass(), ResponseStatus.class);
statusCode = annotation != null ? annotation.value() : BAD_REQUEST;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public UserNotFoundException(String message) {

@Override
protected boolean suppressStackTrace() {
return true;
return false;
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.openconext</groupId>
<artifactId>myconext</artifactId>
<version>7.4.4</version>
<version>7.4.5</version>
<packaging>pom</packaging>
<name>myconext</name>
<description>My OpenConext</description>
Expand Down
2 changes: 1 addition & 1 deletion public-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openconext</groupId>
<artifactId>myconext</artifactId>
<version>7.4.4</version>
<version>7.4.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>public-gui</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tiqr-mock/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openconext</groupId>
<artifactId>myconext</artifactId>
<version>7.4.4</version>
<version>7.4.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>tiqr-mock</artifactId>
Expand Down

0 comments on commit fc49de2

Please sign in to comment.