Skip to content

fix: expose download HTTP status in onError#1020

Open
loiclouvet wants to merge 1 commit into
wonday:masterfrom
loiclouvet:fix/expose-download-http-status
Open

fix: expose download HTTP status in onError#1020
loiclouvet wants to merge 1 commit into
wonday:masterfrom
loiclouvet:fix/expose-download-http-status

Conversation

@loiclouvet
Copy link
Copy Markdown

Summary

  • fail PDF downloads when the HTTP response status is outside the 2xx range
  • attach the response status to the emitted download error
  • type onError with a new PdfError type exposing optional status

Fixes #493.

Validation

  • node --check index.js
  • npm pack --dry-run

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.

Improvement request: add http status code and response body to error object in onError callback

1 participant