Skip to content

Conversation

@tseaver
Copy link
Contributor

@tseaver tseaver commented Aug 9, 2016

We do see such (transient) errors in the wild.

We do see such (transient) errors in the wild.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 9, 2016

class BadGateway(ServerError):
"""Exception mapping a '502 Bad Gateway' response."""
code = 502

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Aug 9, 2016

LGTM (aside from my question, we can address outside of this)

@tseaver tseaver merged commit bd5273e into googleapis:master Aug 9, 2016
@tseaver tseaver deleted the add-502-exception-class branch August 9, 2016 22:18
@dhermes
Copy link
Contributor

dhermes commented Aug 9, 2016

@tseaver Why not use six.moves.http_client.BAD_GATEWAY and siblings?

@tseaver
Copy link
Contributor Author

tseaver commented Aug 9, 2016

Those constants don't seem to me to add any value here: the actual code is what matters, and we are mapping to our own class hierarchy.

@dhermes
Copy link
Contributor

dhermes commented Aug 9, 2016

It's just more canonical than a bunch of constant int values scatterred around

@tseaver
Copy link
Contributor Author

tseaver commented Aug 10, 2016

They are hardly "scattered": each one is in the class which defines its meaning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: core cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants