feat: enable max queue size for chromium and libreoffice

fix gotenberg/gotenberg#463
This commit is contained in:
timgrohmann
2024-02-17 21:13:07 +01:00
committed by Julien Neuhart
parent 975a9f5344
commit 770208024d
6 changed files with 81 additions and 15 deletions

View File

@@ -540,6 +540,16 @@ func convertUrl(ctx *api.Context, chromium Api, engine gotenberg.PdfEngine, url
)
}
if errors.Is(err, gotenberg.ErrMaximumQueueSizeExceeded) {
return api.WrapError(
fmt.Errorf("convert to PDF: %w", err),
api.NewSentinelHttpError(
http.StatusTooManyRequests,
"The maximum queue size has been reached",
),
)
}
return fmt.Errorf("convert to PDF: %w", err)
}