Knowledge Base Prep: Rescue DeleteRestrictionError with 422 Unprocessable Entity
This commit is contained in:
parent
bf4e1c19c6
commit
365e8db792
1 changed files with 1 additions and 0 deletions
|
@ -7,6 +7,7 @@ module ApplicationController::HandlesErrors
|
||||||
rescue_from ActiveRecord::RecordNotFound, with: :not_found
|
rescue_from ActiveRecord::RecordNotFound, with: :not_found
|
||||||
rescue_from ActiveRecord::StatementInvalid, with: :unprocessable_entity
|
rescue_from ActiveRecord::StatementInvalid, with: :unprocessable_entity
|
||||||
rescue_from ActiveRecord::RecordInvalid, with: :unprocessable_entity
|
rescue_from ActiveRecord::RecordInvalid, with: :unprocessable_entity
|
||||||
|
rescue_from ActiveRecord::DeleteRestrictionError, with: :unprocessable_entity
|
||||||
rescue_from ArgumentError, with: :unprocessable_entity
|
rescue_from ArgumentError, with: :unprocessable_entity
|
||||||
rescue_from Exceptions::UnprocessableEntity, with: :unprocessable_entity
|
rescue_from Exceptions::UnprocessableEntity, with: :unprocessable_entity
|
||||||
rescue_from Exceptions::NotAuthorized, with: :unauthorized
|
rescue_from Exceptions::NotAuthorized, with: :unauthorized
|
||||||
|
|
Loading…
Reference in a new issue