craft
craft copied to clipboard
Print better messages for generic HTTP errors
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