node-gh / gh

(DEPRECATED) GitHub CLI made with NodeJS. Use the official https://cli.github.com/ instead.
http://nodegh.io
Other
1.71k stars 217 forks source link

fix(pull-request.js): Update pull request send error handling #568

Closed jwu910 closed 6 years ago

jwu910 commented 6 years ago

@protoEvangelion Take a look at this fix. Seems noticed that if a branch is not found, the error log prints with "Undefined" as the message. Threw in an extra catch to check for message being available or not. I wasn't familiar with the other error cases and if/when the errors[0].message actually returns something.

Let me know if you have questions

fix #567

protoEvangelion commented 6 years ago

I like where you are going with this! Very thorough. Do you see any potential problems with how I refactored it?

protoEvangelion commented 6 years ago

:tada: This PR is included in version 1.13.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: