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

feat(request): add flag to disable logging api warnings #925

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dcilke
Copy link
Member

@dcilke dcilke commented Nov 20, 2024

When using the client library and the vX api, it can be undesirable/noisy to log

This is a future API version, which may change without warning.

for every request.

return getIt([
retry({shouldRetry}),
...envMiddleware,
printWarnings,
printWarnings(config?.ignoreSanityAPIWarnings),
Copy link
Contributor

@j33ty j33ty Nov 20, 2024

Choose a reason for hiding this comment

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

Another alternative here is to skip printWarnings middleware if config.ignoreSanityAPIWarnings flag is set. That makes printWarnings middleware simpler.

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.

2 participants