mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 16:53:37 +02:00
Better error handling
This commit is contained in:
parent
57d239ccd1
commit
0d89dff63a
1 changed files with 5 additions and 0 deletions
|
@ -29,6 +29,11 @@ class Registrar::SessionsController < SessionsController
|
||||||
service_name: 'Testing'
|
service_name: 'Testing'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if response.faultcode
|
||||||
|
render json: { message: response.detail.message }, status: :unauthorized
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
@user = find_user_by_idc(response.user_id_code)
|
@user = find_user_by_idc(response.user_id_code)
|
||||||
|
|
||||||
if @user.persisted?
|
if @user.persisted?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue