Skip to content

Create custom exception for API errors containing the status code#297

Merged
germanattanasio merged 3 commits intov1.0.0from
mdk/279-improve-exceptions
Nov 6, 2017
Merged

Create custom exception for API errors containing the status code#297
germanattanasio merged 3 commits intov1.0.0from
mdk/279-improve-exceptions

Conversation

@mkistler
Copy link
Copy Markdown

@mkistler mkistler commented Nov 5, 2017

This PR fixes #279 by adding a new custom exception class for API errors with explicit fields for the status code and extra info.


class WatsonInvalidArgument(WatsonException):
pass

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should _cleanup_param_value, _cleanup_param_values and all the other clean methods be @ staticmethod?

@germanattanasio
Copy link
Copy Markdown
Contributor

I think you are missing an import on test_conversation_v1

@germanattanasio germanattanasio merged commit d8bc4ea into v1.0.0 Nov 6, 2017
@germanattanasio germanattanasio deleted the mdk/279-improve-exceptions branch November 14, 2017 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants