- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 32
Open
Description
Hi,
I'm calling a rest api and the server is returning server response 422, but the error I'm getting in the onError block shows 'unknown' with message '-1 - Unknown'
The log shows:
200 'https://myapi.com/'
responseSerializationFailed(Alamofire.AFError.ResponseSerializationFailureReason.jsonSerializationFailed(Error Domain=NSCocoaErrorDomain Code=3840 "Invalid value around character 0." UserInfo={NSDebugDescription=Invalid value around character 0.}))
When I run the api in swagger the json returned is:
{
  "message": "The selected email is invalid.",
  "errors": [
    {
      "name": "email",
      "desc": "The selected email is invalid."
    }
  ]
}
and the headers shown are:
 access-control-allow-credentials: true 
 access-control-allow-headers: X-Platform, Content-Type, X-Auth-Token, Origin, Authorization, X-Requested-With, x-xsrf-token 
 access-control-allow-methods: GET, POST, PUT, DELETE, OPTIONS 
 access-control-allow-origin: http://subbyfinder.naamtechstaging.com 
 cache-control: no-cache, private 
 connection: keep-alive 
 content-type: application/json 
 date: Wed, 20 Jun 2018 05:04:23 GMT 
 server: nginx/1.10.3 (Ubuntu) 
 transfer-encoding: chunked 
Thanks,
WS is great and thanks for all your efforts.
Metadata
Metadata
Assignees
Labels
No labels