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

Timeout library sets status code to 0 #397

Open
Allcharles opened this issue Jun 15, 2021 · 1 comment
Open

Timeout library sets status code to 0 #397

Allcharles opened this issue Jun 15, 2021 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Allcharles
Copy link

Timeout library sets the status code of timed out requests to 0. This may cause issues for a number of people because of the following:

  • 0 is a boolean value for false and may interfere with pre-existing logic as no other code will return falsy
  • There is no clear documentation saying what the status code will be (my first assumption was either a 408 Request Timeout, or 504 Gateway Timeout)

It would be nice if we either used an existing status code, or allow the status code to be set by the user in the forRoot so that they can prevent the use of magic numbers in their application.

@IKatsuba
Copy link
Owner

@Allcharles, thank you for the excellent issue! I will try to think about that

@IKatsuba IKatsuba self-assigned this Sep 24, 2021
@IKatsuba IKatsuba added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants