Return mismatched structs in error
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2024-04-17 06:20:32 +02:00
parent fede9f9005
commit 487786bc69
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -87,7 +87,7 @@ func encodeFromReader(reader io.ReadCloser, job *Job, inputMimeType string, w ht
decProps.FullColorRange != job.Config.Properties.FullColorRange ||
decProps.TimeBase() != job.Config.Properties.TimeBase() {
w.Header().Set("x-encoder-error", "")
w.Header().Set("x-decoder-error", "mismatched config properties")
w.Header().Set("x-decoder-error", fmt.Sprintf("mismatched config properties: job %v != decoded %v", job.Config.Properties, decProps))
w.WriteHeader(http.StatusBadRequest)
return
}