diff options
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r-- | app/controllers/api/v1/statuses_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index 52d0fb9bc..a9728f997 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -58,7 +58,11 @@ class Api::V1::StatusesController < Api::BaseController content_type: status_params[:content_type], idempotency: request.headers['Idempotency-Key']) - render json: @status, serializer: @status.is_a?(ScheduledStatus) ? REST::ScheduledStatusSerializer : REST::StatusSerializer + if @status.nil? + raise Mastodon::ValidationError, 'Bangtags processed. No output.' + else + render json: @status, serializer: @status.is_a?(ScheduledStatus) ? REST::ScheduledStatusSerializer : REST::StatusSerializer + end end def destroy |