diff --git a/app/controllers/v0/banners_controller.rb b/app/controllers/v0/banners_controller.rb index 4d37bd2725c..dc320f88aba 100644 --- a/app/controllers/v0/banners_controller.rb +++ b/app/controllers/v0/banners_controller.rb @@ -8,7 +8,7 @@ class BannersController < ApplicationController def by_path # Default to 'full_width_banner_alert' banner (bundle) type. banner_type = params.fetch(:type, 'full_width_banner_alert') - return render json: { error: 'Path parameter is required' }, status: :bad_request if path.blank? + return render json: { error: 'Path parameter is required' }, status: :unprocessable_entity if path.blank? banners = Banner.where(entity_bundle: banner_type).by_path(path) render json: { banners:, path:, banner_type: }