Re: [elm-discuss] Distinguishing HTTP error codes

2017-12-03 Thread Michal Blazejczyk
Actually, this was a problem with CORS configuration on the server. Once I fixed it, the problem in Elm went away. Apologies and thank you :) Best, Michal On Sunday, December 3, 2017 at 8:59:01 AM UTC-5, Peter Damoc wrote: > > Are you able to confirm in the developer console or Postman or

Re: [elm-discuss] Distinguishing HTTP error codes

2017-12-03 Thread Peter Damoc
Are you able to confirm in the developer console or Postman or some other tool that you are actually getting a 401 from the server? I'm getting 400 and 401 just fine from my servers and Elm is encoding them just fine as a BadStatus. On Sun, Dec 3, 2017 at 5:36 AM, Michal Blazejczyk <

[elm-discuss] Distinguishing HTTP error codes

2017-12-03 Thread Michal Blazejczyk
Hi all, I'm just beginning to get into Elm, and I encountered an issue. My Elm app is making a POST request (Http.post) and when the server returns 400 or 401, I get NetworkError instead of BadStatus which means that I cannot distinguish between error codes. Looking at Javascript generated