Skip to content

Commit

Permalink
🎨 Include the validation error in Unprocessable Entity reason (openwa…
Browse files Browse the repository at this point in the history
…llet-foundation#3517)

Just raising the `HTTPUnprocessableEntity` exception doesn't report the validation error to the client

Signed-off-by: ff137 <[email protected]>
Co-authored-by: jamshale <[email protected]>
  • Loading branch information
ff137 and jamshale authored Feb 13, 2025
1 parent b12e023 commit 69992cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acapy_agent/admin/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ async def ready_middleware(request: web.BaseRequest, handler: Coroutine):
request.path,
validation_error_message,
)
raise
raise web.HTTPUnprocessableEntity(reason=validation_error_message) from e
except (LedgerConfigError, LedgerTransactionError) as e:
# fatal, signal server shutdown
LOGGER.critical("Shutdown with %s", str(e))
Expand Down

0 comments on commit 69992cd

Please sign in to comment.