Skip to main content

max / makenotwork

server: surface export_projects serialize failure as 500 A full-catalog export that silently degraded to "{}" looked like a successful 200 while delivering nothing; a serialize error now returns AppError::Internal (500) for this trust-critical no-lock-in export. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-05 15:50 UTC
Commit: 8855988da40266e1001e264239fd2384b6846181
Parent: 34fb663
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!(