Everything is configurable :-)

I see we missed to document that setting. We documented how to do it for
custom media types here:
http://doc.akka.io/docs/akka-http/current/scala/http/routing-dsl/directives/method-directives/extractMethod.html#custom-http-method

Which is basically the same process you'll need to do for the status code:

val parserSettings =
ParserSettings(system).withCustomStatusCodes(StatusCodes.custom(666,
"BadStatusCode", "The number of the beast", false, false))

val serverSettings = ServerSettings(system).withParserSettings(parserSettings)

val binding = Http().bindAndHandle(routes, host, port, settings =
serverSettings)


I'll add that to the docs.

Happy hakking

-- 
Konrad `ktoso` Malawski
Akka <http://akka.io> @ Lightbend <http://lightbend.com>

On 4 January 2017 at 18:46:08, Patrick O'Reilly ([email protected])
wrote:

Hi,

We're using Akka HTTP client to consume a remote API. This API however is
returning non-standard status codes in the 600's which cannot be parsed by
Akka. akka.http.ParserSettings.withCustomStatusCodes only allow valid
100-599 codes. Does anyone have a solution to this problem? The exception
thrown is an illegal response status but the exception has no details on
the actual status code.

Thanks,
Patrick

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups
"Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to