This fixes a couple things related to error handling:
W3NameClient::resolve now actually checks the status code of the API response and returns errors
APIError now includes the HTTP status code
The cli now prints an error report to stderr on failure and calls process::exit instead of panicking
The cli's publish command now only falls back to creating an initial revision if the request for the current revision returns 404. Other errors are treated as failures and printed. Closes #4
This fixes a couple things related to error handling:
W3NameClient::resolve
now actually checks the status code of the API response and returns errorsAPIError
now includes the HTTP status codeprocess::exit
instead of panickingpublish
command now only falls back to creating an initial revision if the request for the current revision returns 404. Other errors are treated as failures and printed. Closes #4