Skip to content

Conversation

@techpeace
Copy link

Adds support for HTTP 429 Too Many Requests status.

@techpeace
Copy link
Author

Howdy! Thanks for the library 🙌

I ran into the issue raised in #38 myself recently:

Failed to get image for https://www.bleepingcomputer.com/news/security/healthcare-services-group-data-breach-impacts-624-000-people: {
  error: true,
  result: {
    success: false,
    requestUrl: 'https://www.bleepingcomputer.com/news/security/healthcare-services-group-data-breach-impacts-624-000-people',
    error: 'Server has returned a 400/500 error code',
    errorDetails: Error: Server has returned a 400/500 error code

I found I had to add some logging to request.ts in order to track down the actual issue (the 429, in my case).

Would it make sense to surface any part of the response in the error object, in addition to errorDetails? I realize status and statusText could be duplicative if it's caught by the case statement.

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.

1 participant