Align Reanimator export with updated integration guide

This commit is contained in:
2026-02-15 20:06:36 +03:00
parent 1b1bc74fc7
commit 8715fcace4
6 changed files with 229 additions and 77 deletions

View File

@@ -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
}