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

Don't silently drop properties when processing an httpRoute #762

Merged
merged 1 commit into from
May 9, 2024

Conversation

bitgopatmcl
Copy link
Contributor

@bitgopatmcl bitgopatmcl commented May 9, 2024

Fixes an issue where errors are swallowed while processing an httpRoute. Generally this happens while processing a request type, the error just gets swallowed and the request property is omitted from the resulting schema. This then errors out later on in the section of the codebase that expects a request to be there, causing this hard-to-debug error:

Error parsing SomeApiSpec: Route must have a request

With this change, the actual error is passed all the way through, making it much easier to see what went wrong.

@bitgopatmcl bitgopatmcl changed the title Don't silently drop properties from httpRequest Don't silently drop properties when processing an httpRoute May 9, 2024
@bitgopatmcl bitgopatmcl marked this pull request as ready for review May 9, 2024 14:59
@bitgopatmcl bitgopatmcl requested a review from a team as a code owner May 9, 2024 14:59
@bitgopatmcl bitgopatmcl marked this pull request as draft May 9, 2024 15:41
@bitgopatmcl bitgopatmcl force-pushed the VL-1836-fix-error-message branch 2 times, most recently from 92d03a1 to 48821de Compare May 9, 2024 15:43
@bitgopatmcl bitgopatmcl marked this pull request as ready for review May 9, 2024 15:43
Copy link
Contributor

@ericcrosson-bitgo ericcrosson-bitgo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👨‍🍳 🚀

@ericcrosson-bitgo ericcrosson-bitgo merged commit a16cea1 into master May 9, 2024
8 checks passed
@ericcrosson-bitgo ericcrosson-bitgo deleted the VL-1836-fix-error-message branch May 9, 2024 17:01
Copy link

github-actions bot commented May 9, 2024

🎉 This PR is included in version @api-ts/[email protected] 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Jun 4, 2024

🎉 This PR is included in version @api-ts/[email protected] 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Jun 4, 2024

🎉 This PR is included in version @api-ts/[email protected] 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Jun 4, 2024

🎉 This PR is included in version @api-ts/[email protected] 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Aug 5, 2024

🎉 This PR is included in version @api-ts/[email protected] 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants