Skip to content

Timeout library sets status code to 0 #397

@Allcharles

Description

@Allcharles

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.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions