Skip to content

fix(analysis): show the Exaflow message for a 422 response - #55

Merged
KFilippopolitis merged 1 commit into
masterfrom
fix/accept-exaflow-422
Nov 12, 2026
Merged

KFilippopolitis merged 1 commit into
masterfrom
fix/accept-exaflow-422

Conversation

@KFilippopolitis

Copy link
Copy Markdown
Contributor

Summary

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.

AnalysisService.convertResponseToAnalysisResult did not list 422, so the backend handled it as an unexpected status and the user got a 500. 422 is now passed through with the Exaflow message, the same way as 400.

Files changed

  • src/main/java/hbp/mip/algorithm/AnalysisService.java: add 422 to the Exaflow error statuses.
  • src/test/java/hbp/mip/algorithm/AnalysisServiceRequestIdTest.java: test that a 422 body is passed through.

Testing

  • mvn -B -ntp -q test -Dtest=AnalysisServiceRequestIdTest: passed.
  • The full mvn test was not run.

Risk and deployment order

  • No API, database or configuration change. 400 is still handled, because Exaflow keeps it for other request errors.
  • Deploy this before, or together with, the Exaflow change. With an older backend, a malformed analysis request against the new Exaflow gives the user a 500.

Rollback

Revert this commit. It is safe to revert only if Exaflow is also rolled back.

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.
@KFilippopolitis
KFilippopolitis merged commit f085474 into master Nov 12, 2026
14 checks passed
@KFilippopolitis
KFilippopolitis deleted the fix/accept-exaflow-422 branch November 12, 2026 12:00
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