Better error handling

This commit is contained in:
Mickaël Rémond 2019-05-17 11:10:41 +02:00 committed by GitHub
parent 48f5cc3b88
commit fc2dfb0f1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -237,9 +237,11 @@ make_req(Method, Path, LUser, LServer, Password) ->
<<"401">> -> {error, not_authorized};
<<"403">> -> {error, not_allowed};
<<"400">> -> {error, RespBody};
<<"503">> -> {error, RespBody};
<<"204">> -> {ok, <<"">>};
<<"201">> -> {ok, created};
<<"200">> -> {ok, RespBody}
<<"200">> -> {ok, RespBody};
_ -> {error, RespBody}
end.
%%%----------------------------------------------------------------------