diff --git a/pkg/modules/api/middlewares.go b/pkg/modules/api/middlewares.go index d40c1432..3854e8bc 100644 --- a/pkg/modules/api/middlewares.go +++ b/pkg/modules/api/middlewares.go @@ -40,10 +40,6 @@ func ParseError(err error) (int, string) { return http.StatusTooManyRequests, http.StatusText(http.StatusTooManyRequests) } - if errors.Is(err, gotenberg.ErrPdfEngineMethodNotSupported) { - return http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented) - } - if errors.Is(err, gotenberg.ErrPdfFormatNotSupported) { return http.StatusBadRequest, "At least one PDF engine cannot process the requested PDF format, while others may have failed to convert due to different issues" } diff --git a/pkg/modules/api/middlewares_test.go b/pkg/modules/api/middlewares_test.go index e921f454..7fa5a1c1 100644 --- a/pkg/modules/api/middlewares_test.go +++ b/pkg/modules/api/middlewares_test.go @@ -38,11 +38,6 @@ func TestParseError(t *testing.T) { expectStatus: http.StatusTooManyRequests, expectMessage: http.StatusText(http.StatusTooManyRequests), }, - { - err: gotenberg.ErrPdfEngineMethodNotSupported, - expectStatus: http.StatusNotImplemented, - expectMessage: http.StatusText(http.StatusNotImplemented), - }, { err: gotenberg.ErrPdfFormatNotSupported, expectStatus: http.StatusBadRequest,