fix: make error handling more flexible
This commit is contained in:
parent
963d63b899
commit
4b8cea4498
|
@ -559,7 +559,7 @@ schema("/bridges_probe") ->
|
||||||
%% references to fields, and they don't share whole-bridge validators if
|
%% references to fields, and they don't share whole-bridge validators if
|
||||||
%% they exist. Such validators will only be triggered by
|
%% they exist. Such validators will only be triggered by
|
||||||
%% `create_dry_run'...
|
%% `create_dry_run'...
|
||||||
throw:{_Schema, [#{kind := validation_error} = Reason0]} ->
|
throw:{_Schema, [#{kind := _} = Reason0 | _]} ->
|
||||||
Reason = redact(Reason0),
|
Reason = redact(Reason0),
|
||||||
?BAD_REQUEST('TEST_FAILED', map_to_json(Reason))
|
?BAD_REQUEST('TEST_FAILED', map_to_json(Reason))
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue