In production scenarios having the Shop that triggers the log is helpful in debugging
Simplifies getting the Shop in contexts where we only have the Request object
WHAT is this pull request doing?
Adds a new helper to grab the Shop from the Request object
Updates the logs to include the Shop information in the logs
There are some cases where we still do not have the Shop context to add to the log. This is cases like extension authentication where the Shop is only known from the ID Token. This means we can't log the Shop until after we validated and decode the ID token.
Type of change
[ ] Patch: Bug (non-breaking change which fixes an issue)
[x] Minor: New feature (non-breaking change which adds functionality)
[ ] Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist
[x] I have used pnpm changeset to create a draft changelog entry (do NOT update the CHANGELOG.md files manually)
[x] I have added/updated tests for this change
[ ] I have documented new APIs/updated the documentation for modified APIs (for public APIs)
WHY are these changes introduced?
WHAT is this pull request doing?
There are some cases where we still do not have the Shop context to add to the log. This is cases like extension authentication where the Shop is only known from the ID Token. This means we can't log the Shop until after we validated and decode the ID token.
Type of change
Checklist
pnpm changeset
to create a draft changelog entry (do NOT update theCHANGELOG.md
files manually)