mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-16 20:32:13 +01:00
fix(pdfengines): return a 400 Bad Request if no metadata to write
This commit is contained in:
@@ -238,6 +238,9 @@ func writeMetadataRoute(engine gotenberg.PdfEngine) api.Route {
|
||||
return fmt.Errorf("unmarshal metadata: %w", err)
|
||||
}
|
||||
}
|
||||
if len(metadata) == 0 {
|
||||
return errors.New("no metadata")
|
||||
}
|
||||
return nil
|
||||
}).
|
||||
Validate()
|
||||
|
||||
Reference in New Issue
Block a user