Corregge validazione upload copertina e generazione slate al go-live.

Rifiuta file troppo grandi o non-immagine via Marcel prima di attach, e genera la slate in sync anche quando cover_image esiste ma cover_slate non è ancora pronta.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-20 09:51:33 +02:00
co-authored by Cursor
parent 41d4235258
commit e09b3ffcf8
7 changed files with 50 additions and 8 deletions
@@ -2,6 +2,7 @@ module Api
module V1
class BaseController < ApplicationController
rescue_from Teams::EntitlementError, with: :render_entitlement_error
rescue_from BrandingAttachments::CoverUploadError, with: :render_cover_upload_error
rescue_from Youtube::BroadcastService::Error, with: :render_youtube_error
private
@@ -20,6 +21,10 @@ module Api
billing_url: error.billing_url
}, status: :forbidden
end
def render_cover_upload_error(error)
render json: { error: error.message, error_code: "cover_upload_invalid" }, status: :unprocessable_entity
end
end
end
end