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

Include env[:headers] in Stubs::NotFound #1514

Merged
merged 1 commit into from Jun 30, 2023

Conversation

yykamei
Copy link
Contributor

@yykamei yykamei commented Jun 29, 2023

When using strict_mode, I often get an error with Stubs::NotFound and can't figure out why such an error happens at a glance. After looking into the problem carefully, I finally find out some headers are missing. This is not a good developer experience.

I think the error message of Stubs::NotFound should include headers to let developers know the difference between the expected and actual requests.

That's why this patch appends env[:headers] to the error message.

When using `strict_mode`, I often get an error with `Stubs::NotFound`
and can't figure out why such an error happens at a glance.
After looking into the problem carefully, I finally find out some
headers are missing. This is not a good developer experience.

I think the error message of `Stubs::NotFound` should include headers to
let developers know the difference between the expected and actual
requests.

That's why this patch appends `env[:headers]` to the error message.
Copy link
Member

@iMacTia iMacTia left a comment

Choose a reason for hiding this comment

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

Great quality-of-life improvement for devs 🙌 !
Thank you @yykamei

@iMacTia iMacTia merged commit 1e3e4e0 into lostisland:main Jun 30, 2023
8 checks passed
@yykamei yykamei deleted the test-adapter branch June 30, 2023 09:51
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.

None yet

2 participants