diff --git a/app/controllers/api/v4/imports_controller.rb b/app/controllers/api/v4/imports_controller.rb index 422192b7af..5b41d243b6 100644 --- a/app/controllers/api/v4/imports_controller.rb +++ b/app/controllers/api/v4/imports_controller.rb @@ -3,6 +3,10 @@ class Api::V4::ImportsController < ApplicationController before_action :doorkeeper_authorize! before_action :validate_token_organization + rescue_from ActionController::ParameterMissing do |error| + render json: {error: "Unable to find key in payload: \"#{error.param}\""}, status: :bad_request + end + def import return head :not_found unless Flipper.enabled?(:imports_api)