Skip to content

Commit

Permalink
File change
Browse files Browse the repository at this point in the history
  • Loading branch information
sentry-autofix[bot] authored Oct 19, 2024
1 parent c3eb357 commit f8fd5db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/seer/json_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ def wrapper(config: AppConfig = injected) -> Any:
result: BaseModel = implementation(request_annotation.model_validate(data))
except ValidationError as e:
sentry_sdk.capture_exception(e)
raise BadRequest(str(e))
# Provide more detailed error message
error_details = "; ".join([f"{'.'.join(map(str, error['loc']))}: {error['msg']}" for error in e.errors()])
raise BadRequest(f"Validation error: {error_details}")

return result.model_dump()

Expand Down Expand Up @@ -193,4 +195,4 @@ def compare_signature(
sentry_sdk.capture_message("Signature did not match hmac")

sentry_sdk.capture_message("No signature matches found.")
return False
return False

0 comments on commit f8fd5db

Please sign in to comment.