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

Specific error for gateway timeout #9

Open
thaugrud opened this issue Mar 11, 2020 · 0 comments
Open

Specific error for gateway timeout #9

thaugrud opened this issue Mar 11, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@thaugrud
Copy link
Contributor

Is your feature request related to a problem? Please describe
Currently you can't tell the difference between hiscores being unavailable or the request simply timing out. The hiscores are often very slow, but operational. Distinguishing these scenarios is useful for knowing if it is worth increasing timeout limit.

Describe the solution you'd like
A specific error 504 gateway timeout or possibly 408 request timeout to indicate it was a timeout issue rather than unavailable service.

export class GatewayTimeoutError extends HttpError {
  constructor(msg: string) {
    super(msg, 504);
  }
}

Describe alternatives you've considered
Guessing if it was a timeout or unavailable error.

@thaugrud thaugrud added enhancement New feature or request good first issue Good for newcomers labels Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Development

No branches or pull requests

1 participant