mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-18 05:02:15 +01:00
adding new error when files key does not exist in the form data
This commit is contained in:
@@ -72,6 +72,8 @@ func convertHandler(next http.Handler) http.Handler {
|
||||
if err != nil {
|
||||
if noFileToConvertError, ok := err.(*converter.NoFileToConvertError); ok {
|
||||
http.Error(w, noFileToConvertError.Error(), http.StatusBadRequest)
|
||||
} else if filesKeyNotFoundError, ok := err.(*converter.FilesKeyNotFoundError); ok {
|
||||
http.Error(w, filesKeyNotFoundError.Error(), http.StatusBadRequest)
|
||||
} else {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user