mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 20:27:30 +02:00
Fix error generation
This commit is contained in:
parent
156ca0b54f
commit
89afe0bdf2
2 changed files with 3 additions and 3 deletions
|
@ -17,10 +17,10 @@ module Repp
|
|||
@response = { code: 2303, message: 'Object does not exist' }
|
||||
render(json: @response, status: :not_found)
|
||||
rescue ActionController::ParameterMissing, Apipie::ParamMissing => e
|
||||
@response = { code: 2003, message: e }
|
||||
@response = { code: 2003, message: e.message.gsub(/\n/, '. ') }
|
||||
render(json: @response, status: :bad_request)
|
||||
rescue Apipie::ParamInvalid => e
|
||||
@response = { code: 2005, message: e }
|
||||
@response = { code: 2005, message: e.message.gsub(/\n/, '. ') }
|
||||
render(json: @response, status: :bad_request)
|
||||
ensure
|
||||
create_repp_log
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue