wordpress-mobile / release-toolkit-gutenberg-mobile

Automation Scripts for Releasing Gutenberg-Mobile Updates to the WordPress Mobile Apps.
Mozilla Public License 2.0
5 stars 2 forks source link

Add descriptive error messages to CLI output #169

Closed derekblank closed 10 months ago

derekblank commented 10 months ago

Adds descriptive error messages to CLI command outputs (rather than returning only the error code). Also adds a confirm prompt to check if the branch already exists.

derekblank commented 10 months ago

@jhnstn This is a first-pass at how we might handle error messaging. It feels a bit more descriptive than just returning pr, err, and also helps a bit with self-documenting code. Let me know if you have any thoughts or suggestions for updating, or if there's any benefit to retaining all of the return pr, err statements. Otherwise, I can apply this error-message format to anywhere else we're checking for err != nil.

derekblank commented 10 months ago

Thanks for reviewing @jhnstn! I've updated to retain the pr, err return, but also include a more-specific error message along with the err output. Let me know what else we might want to include on this PR before merging. 👍