Repository navigation
fix(analysis): show the Exaflow message for a 422 response - #55
Merged
Merged
Conversation
Exaflow now answers 422 when the analysis request body is not JSON or does not match its schema (madgik/exaflow#665). It answered 400 before. 422 was not in the list of Exaflow error statuses, so it was handled as an unexpected status and the user got a 500. It is now passed through with the Exaflow message, like 400.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Exaflow now answers
422when the analysis request body is not JSON or does not match its schema (madgik/exaflow#665). It answered400before.AnalysisService.convertResponseToAnalysisResultdid not list422, so the backend handled it as an unexpected status and the user got a500.422is now passed through with the Exaflow message, the same way as400.Files changed
src/main/java/hbp/mip/algorithm/AnalysisService.java: add422to the Exaflow error statuses.src/test/java/hbp/mip/algorithm/AnalysisServiceRequestIdTest.java: test that a422body is passed through.Testing
mvn -B -ntp -q test -Dtest=AnalysisServiceRequestIdTest: passed.mvn testwas not run.Risk and deployment order
400is still handled, because Exaflow keeps it for other request errors.500.Rollback
Revert this commit. It is safe to revert only if Exaflow is also rolled back.