Skip to content

Commit

Permalink
fix: pass throwable
Browse files Browse the repository at this point in the history
  • Loading branch information
TeddyCr committed Nov 29, 2024
1 parent ce61d01 commit 1dc8be0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public InvalidServiceConnectionException(String message) {
super(Response.Status.BAD_REQUEST, ERROR_TYPE, message);
}

public InvalidServiceConnectionException(String message, Throwable e) {
super(Response.Status.BAD_REQUEST, ERROR_TYPE, message, e);
}

private InvalidServiceConnectionException(Response.Status status, String message) {
super(status, ERROR_TYPE, message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,15 @@ public static Object convert(
throw new InvalidServiceConnectionException(
String.format(
"Failed to convert [%s] to type [%s]. Review the connection.\n%s",
connectionName, connectionType, message));
connectionName, connectionType, message),
e);
}
// If we don't have the name, we are decrypting from the db
throw new InvalidServiceConnectionException(
String.format(
"Failed to load the connection of type [%s]. Did migrations run properly?\n%s",
connectionType, message));
connectionType, message),
e);
}
}
}

0 comments on commit 1dc8be0

Please sign in to comment.