cli: print error details to stderr
Closed this issue · 0 comments
remyla commented
right now the command is muted when an error occurs. we have to echo the exit status code (with $?) and refer to the error table to understand what happened.
EXIT VALUES
0 Success
1 Syntax or usage error
2 Not a damas repository (or any parent)
3 Server is unreachable
7 (Server 207) Multi-Status (some nodes do not exist)
40 (Server 400) Bad request (not formatted correctly)
41 (Server 401) Unauthorized
43 (Server 403) Forbidden (the user does not have the right permission)
44 (Server 404) Not found (all the nodes do not exist)
49 (Server 409) Conflict (all nodes already exist with these identifiers)
50 (Server 500) Internal server error
60 (Server xxx) Unknown server error
Printing the error's explanation text to stderr would ease debug