Align Reanimator export with updated integration guide
This commit is contained in:
@@ -610,7 +610,11 @@ func (s *Server) handleExportReanimator(w http.ResponseWriter, r *http.Request)
|
||||
|
||||
reanimatorData, err := exporter.ConvertToReanimator(result)
|
||||
if err != nil {
|
||||
jsonError(w, fmt.Sprintf("Export failed: %v", err), http.StatusInternalServerError)
|
||||
statusCode := http.StatusInternalServerError
|
||||
if strings.Contains(err.Error(), "required for Reanimator export") {
|
||||
statusCode = http.StatusBadRequest
|
||||
}
|
||||
jsonError(w, fmt.Sprintf("Export failed: %v", err), statusCode)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user