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

[WEBDEV-390] Add error handling for invalid IDs #80

Conversation

bryonywatson1
Copy link
Contributor

No description provided.

@@ -182,7 +182,7 @@ def add_headers(request)
def handle_errors(net_response)
case net_response
when Net::HTTPOK # 2xx Status
exception_class = Parliament::NoContentResponseError if net_response['Content-Length'] == '0'
exception_class = Parliament::NoContentResponseError if net_response['Content-Length'] == '0' || !net_response['Content-Length']

Choose a reason for hiding this comment

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

Line is too long. [138/120]

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.2%) to 94.845% when pulling 073fbba on bryonywatson1:bryonywatson1/webdev-390_invalid-id-error-handling into bb513cd on ukparliament:master.

@bryonywatson1 bryonywatson1 force-pushed the bryonywatson1/webdev-390_invalid-id-error-handling branch from 073fbba to c8ce511 Compare October 25, 2017 11:13
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c8ce511 on bryonywatson1:bryonywatson1/webdev-390_invalid-id-error-handling into bb513cd on ukparliament:master.

@bryonywatson1 bryonywatson1 force-pushed the bryonywatson1/webdev-390_invalid-id-error-handling branch from c8ce511 to c672287 Compare October 25, 2017 16:01
@@ -182,7 +182,7 @@ def add_headers(request)
def handle_errors(net_response)
case net_response
when Net::HTTPOK # 2xx Status
exception_class = Parliament::NoContentResponseError if net_response['Content-Length'] == '0'
exception_class = Parliament::NoContentResponseError if net_response['Content-Length'] == '0' || (net_response['Content-Length'].nil? && net_response.body.nil?)

Choose a reason for hiding this comment

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

Line is too long. [170/120]

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c672287 on bryonywatson1:bryonywatson1/webdev-390_invalid-id-error-handling into bb513cd on ukparliament:master.

@mattrayner mattrayner merged commit c072cfd into ukparliament:master Oct 25, 2017
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.

None yet

4 participants