Skip to content

Conversation

davidmrdavid
Copy link
Collaborator

@davidmrdavid davidmrdavid commented Jun 24, 2020

Addresses: #141

We now throw an exception when start_new fails, whereas before we simply returned None. In doing so, we avoid throwing an internal exception (server response 500) when calling client.create_check_status_response.

In practice, this meant that, before, users hitting an HTTPTrigger with a typo on the orchestration name would see an internal exception with little debug information. Now, we report the real cause of the error and suggest a fix: looking for typos.

I would also love it if we could display this error, and others, as part of an HTTP response. Reading it on the terminal, while common practice, is not as nice, in my opinion.

Finally, this is also an error in Durable-JS.

@davidmrdavid davidmrdavid requested a review from cgillum June 25, 2020 20:05
@cgillum
Copy link
Member

cgillum commented Jun 25, 2020

I forgot to ask - how hard would it be to add a unit test for this? I know we're able to pretty easily mock the HTTP stuff in Durable JS but I'm not as familiar with the Python test setup.

@davidmrdavid
Copy link
Collaborator Author

Hmmm, I'd have to investigate the unit testing setup a little more. Mocking HTTP requests is easy, and I've done it before for other projects, I just need to double check that our testing framework makes that easy to incorporate in a white-box test. I'll get back to you

Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

Awesome - looks good to me! :shipit:

@davidmrdavid
Copy link
Collaborator Author

Heads up, added unit tests! Will merge now, thanks :)
:shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit:

@cgillum
Copy link
Member

cgillum commented Jun 26, 2020

Excellent!!! Also, don't forget to delete your branch after each PR merge into dev.

@davidmrdavid davidmrdavid deleted the djusto/orchestration-client-exception branch June 26, 2020 05:38
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.

2 participants