max / makenotwork
1 file changed,
+6 insertions,
-1 deletion
| @@ -409,7 +409,12 @@ pub(super) async fn export_projects( | |||
| 409 | 409 | "promo_codes": promo_codes_data, | |
| 410 | 410 | "collections": collections_data, | |
| 411 | 411 | "custom_domain": custom_domain_data, | |
| 412 | - | })).unwrap_or_else(|_| "{}".to_string()); | |
| 412 | + | })).map_err(|e| { | |
| 413 | + | // A full-catalog export that silently degraded to "{}" would look like a | |
| 414 | + | // successful 200 while delivering nothing — unacceptable for a trust- | |
| 415 | + | // critical, no-lock-in export. Surface it as a 500 instead. | |
| 416 | + | crate::error::AppError::Internal(anyhow::anyhow!("failed to serialize project export: {e}")) | |
| 417 | + | })?; | |
| 413 | 418 | ||
| 414 | 419 | if is_htmx { | |
| 415 | 420 | let data_uri = format!( |