-
Notifications
You must be signed in to change notification settings - Fork 17
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
Propagate more errors to the client side #458
Conversation
This commit improves error reporting on the client side. It propagates some errors which were previously only captured on the server side. In particular, it will now: - report which property was being resolved, instead of showing internal `auto.test.resources` properties - capture errors which are sent by the server but were dropped because of lack of JSON error handling - report when a container cannot be started or failed during startup - provide clearer message when the test resources service is down Fixes #444
...urces-client/src/main/java/io/micronaut/testresources/client/DefaultTestResourcesClient.java
Outdated
Show resolved
Hide resolved
|
||
@Serdeable | ||
public record SimpleJsonErrorModel( | ||
@JsonProperty("message") String message, |
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.
Is the annotation needed here?
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.
It shouldn't, kept it for consistency with the other properties
return client.resolve(expression, props, properties); | ||
return withErrorHandling( | ||
() -> client.resolve(expression, props, properties), | ||
() -> "Test resources service wasn't able to revolve expression '" + expression + "'" |
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.
() -> "Test resources service wasn't able to revolve expression '" + expression + "'" | |
() -> "Test resources service wasn't able to revolve expression '%s'".formatted(expression) |
Co-authored-by: Álvaro Sánchez-Mariscal <[email protected]>
Kudos, SonarCloud Quality Gate passed! |
This commit improves error reporting on the client side. It propagates some errors which were previously only captured on the server side. In particular, it will now:
auto.test.resources
propertiesFixes #444