Merge pull request #8191 from lafirest/fix/gateway_address_error
fix(gateway): catch the error of invalid address
This commit is contained in:
commit
b14998ea7f
|
@ -575,6 +575,8 @@ with_gateway(GwName0, Fun) ->
|
||||||
lists:join(".", lists:map(fun to_list/1, Path0))
|
lists:join(".", lists:map(fun to_list/1, Path0))
|
||||||
),
|
),
|
||||||
return_http_error(404, "Resource not found. path: " ++ Path);
|
return_http_error(404, "Resource not found. path: " ++ Path);
|
||||||
|
error:{badmatch, {error, einval}} ->
|
||||||
|
return_http_error(400, "Invalid bind address");
|
||||||
Class:Reason:Stk ->
|
Class:Reason:Stk ->
|
||||||
?SLOG(error, #{
|
?SLOG(error, #{
|
||||||
msg => "uncatched_error",
|
msg => "uncatched_error",
|
||||||
|
|
Loading…
Reference in New Issue