Skip to content
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

Raise more accurate ATHR::RequestBody deserialization errors #490

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

Blacksmoke16
Copy link
Member

Context

Resolves #290. This PR relies on the underlying deserialization logic to raise the proper exception type. There doesn't really seem to be directly possible for a URI::Error to be raised, so there are no specs on it, but it's handled in code.

Changelog

  • Raise more accurate ATHR::RequestBody deserialization errors

Before merging, remember to add the athena-framework/athena prefix to the PR number in the PR title

@Blacksmoke16 Blacksmoke16 added component:framework kind:enhancement New functionality to an existing feature labels Dec 15, 2024
Copy link

codecov bot commented Dec 15, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ork/src/controller/value_resolvers/request_body.cr 71.42% 2 Missing ⚠️
Flag Coverage Δ
compiled 8.12% <0.00%> (-0.01%) ⬇️
unit 92.77% <71.42%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
clock 98.18% <ø> (ø)
console 92.74% <ø> (ø)
dependency_injection 64.28% <ø> (ø)
dotenv 96.80% <ø> (ø)
event_dispatcher 82.75% <ø> (ø)
framework 94.07% <71.42%> (-0.13%) ⬇️
image_size 95.03% <ø> (ø)
mercure 93.37% <ø> (ø)
negotiation 97.69% <ø> (ø)
routing 92.96% <ø> (ø)
serializer 87.23% <ø> (ø)
spec 93.54% <ø> (ø)
validator 92.37% <ø> (ø)

📢 Thoughts on this report? Let us know!

@Blacksmoke16 Blacksmoke16 merged commit 13a0c6f into master Dec 15, 2024
12 of 14 checks passed
@Blacksmoke16 Blacksmoke16 deleted the better-errors branch December 15, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:framework kind:enhancement New functionality to an existing feature
Development

Successfully merging this pull request may close these issues.

Request body converter bad request error response is misleading
1 participant