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

we need a getCookieLocale, getQueryLocale ... without throwing so i can chain logic and make fallbacks #7

Open
3 tasks done
lord007tn opened this issue Sep 24, 2024 · 0 comments
Labels
feature Includes new features

Comments

@lord007tn
Copy link

Clear and concise description of the problem

the getCookieLocal, getQueryLocale, getHeaderLocale always throw if no local found

i want to make a logic that check firstly for the query and then the cookies or the header

how can i achieve that without a long chain of tryandcatch

Suggested solution

provide an other functions like tryQueryLocale, tryHeaderLocale
that returns null or undefined and don't throw anything

make an option to the current functions to make it throw or not an error

Alternative

No response

Additional context

No response

Validations

@lord007tn lord007tn added the feature Includes new features label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Includes new features
Projects
None yet
Development

No branches or pull requests

1 participant