mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-17 12:42:16 +01:00
if a converter has been created, cleanup its file if an error happens
This commit is contained in:
@@ -62,6 +62,12 @@ func convertHandler(next http.Handler) http.Handler {
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
logger.Error(err)
|
||||
|
||||
if c != nil {
|
||||
r = context.WithConverter(r, c)
|
||||
cleanup(r)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user