suvallur / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

Unknown status code throws when using ResponseLogFilter #382

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

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 reported on code.google.com by eskato...@gmail.com on 10 Jan 2015 at 11:07

GoogleCodeExporter commented 9 years ago
You're right. Thanks for reporting.

Original comment by johan.ha...@gmail.com on 16 Jan 2015 at 7:06