Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use custom error for commands #10

Merged
merged 4 commits into from
Jul 12, 2021
Merged

use custom error for commands #10

merged 4 commits into from
Jul 12, 2021

Conversation

lomchik
Copy link
Contributor

@lomchik lomchik commented Jul 12, 2021

No description provided.

@@ -0,0 +1,7 @@
export class CommandError extends Error {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming: this class seems more like NetworkError(public httpResponseStatusCode)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed to NetworkError but left status as it is cause it is common name

@lomchik lomchik merged commit 05366c5 into main Jul 12, 2021
@pavlo-liapin pavlo-liapin deleted the add-error-handling branch July 14, 2021 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants