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

Unknown status code throws when using ResponseLogFilter #537

Open
johanhaleby opened this issue Jul 21, 2015 · 2 comments · May be fixed by #1773
Open

Unknown status code throws when using ResponseLogFilter #537

johanhaleby opened this issue Jul 21, 2015 · 2 comments · May be fixed by #1773

Comments

@johanhaleby
Copy link
Collaborator

From eskato...@gmail.com on January 10, 2015 12:07:23

What steps will reproduce the problem? 1. Use rest-assured@2.4.0
2. Call RestAssured.enableLoggingOfRequestAndResponseIfValidationFails()
3. Invoke HTTP resource that return an unknown code, like 601 What is the expected output? What do you see instead? java.lang.IllegalArgumentException: Status code must be greater than 100 and less than 600, was 601.
at com.jayway.restassured.builder.ResponseBuilder.build(ResponseBuilder.java:175)

Without logging enabled things works well.

Enabling logging should not fail tests that pass without it.

From my understanding, HTTP RFCs do not forbid usage of status codes >599, they are simply unspecified.

Original issue: http://code.google.com/p/rest-assured/issues/detail?id=382

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on January 16, 2015 11:06:28

You're right. Thanks for reporting.

Status: Accepted

@macmon
Copy link

macmon commented Feb 28, 2024

Hi,

I created a pull request 1773 where I removed the check from the Builder class. We really need this fix to check our application because we're using "911" as application specific error code.

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

Successfully merging a pull request may close this issue.

2 participants