feat(middleware): log unhandled requests #282
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add a log line to parrot-middleware when a response is not handled.
This also exposes the
logger
on theParrot
object so it can be used byParrotMiddleware
for consistent log styling.Motivation and Context
Currently parrot only logs when a request is matched. This is great when everything is working but there are times when it is good to see the unhandled requests.
Questions I'm not sure of:
How Has This Been Tested?
Packed and ran with a local React module. Added unit tests.
Types of Changes
Checklist:
What is the Impact to Developers Using parrot?
Mock misses will be much easier to see, especially when the call is server-side rather than browser.