You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We discovered this issue recently, our specs test the response code of a PDF generating path, but a mis-configuration of our application middleware(s) meant the response body was compressed before PDFKit attempted to transform it. This resulted in an application error but the response status code was 200.
This PR #469 attempts to remedy this by returning a 500 response status code if exceptions are encountered when transforming the response into PDF.
The text was updated successfully, but these errors were encountered:
When an exception occurs in PDFKit middleware the response status does not reflect this.
https://github.com/pdfkit/pdfkit/blob/master/lib/pdfkit/middleware.rb#L20-L53
We discovered this issue recently, our specs test the response code of a PDF generating path, but a mis-configuration of our application middleware(s) meant the response body was compressed before PDFKit attempted to transform it. This resulted in an application error but the response status code was
200
.This PR #469 attempts to remedy this by returning a
500
response status code if exceptions are encountered when transforming the response into PDF.The text was updated successfully, but these errors were encountered: