craft icon indicating copy to clipboard operation
craft copied to clipboard

Print better messages for generic HTTP errors

Open jan-auer opened this issue 7 years ago • 0 comments

For generic HTTP errors, it would be better to print additional information, rather than:

✖ error HttpError
  at response.text.then.message (/Users/jauer/.config/yarn/global/node_modules/@octokit/rest/lib/request/request.js:72:19)
  at process._tickCallback (internal/process/next_tick.js:68:7)

Desirable user information (INFO log level) would be:

  • The operation that was executing
  • Potential reasons, if known

Desirable debug information (DEBUG/trace log level) would be:

  • The request URL
  • Status code, potentially part of the response body if feasible
  • The calling function and ideally its stack trace

jan-auer avatar Oct 23 '18 07:10 jan-auer