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 withStubs::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.