Comments (6)
I got the exact same problem, also using version 2.1.
Is there any update on this?
from alamofireobjectmapper.
I'm not sure why this would be happening...
See the two Response serializers below (they both return the Alamofire error immediately if it exists):
https://github.com/tristanhimmelman/AlamofireObjectMapper/blob/master/AlamofireObjectMapper/AlamofireObjectMapper.swift#L38
https://github.com/tristanhimmelman/AlamofireObjectMapper/blob/master/AlamofireObjectMapper/AlamofireObjectMapper.swift#L107
What kind of error are you expecting to see that is not returned?
You might want to inspect the NSHTTPURLResponse (response.response
) to get the statusCode and NSData that was returned from the request
from alamofireobjectmapper.
Yeah i have the same problem, it only retrieves the error of "The operation couldn’t be completed. ObjectMapper failed to serialize response". Could it be posible that the callback is retrieving the success or the failure of the objectmapper action
instead of the request?
By example, at a service is retrieving me 500 status error code but the function keeps going to the success case.
Is there any other way to get the status code or the error message?
from alamofireobjectmapper.
After some research it turns out this is a feature of Alamofire. To get the error, you need to call the validate()
function on the request. See the Alamofire docs: https://github.com/Alamofire/Alamofire#validation
from alamofireobjectmapper.
Thank so much, now it works as expected.
from alamofireobjectmapper.
I am having the same issue i could not retrive the status as expected.
Alamofire.upload(data!, with: (myrouter)
.uploadProgress { progress in // main queue by default
// print("Upload Progress: (progress.fractionCompleted)")
}.validate()
.responseJSON { [weak self] response in{
// what can i put here so that i can retrive the status code like 200 or 500
NSURLErrorCannotFindHost
NSURLErrorNetworkConnectionLost
}
from alamofireobjectmapper.
Related Issues (20)
- Publish version 6.3.0 on CocoaPods HOT 3
- What is the compatible version with 'Alamofire', '~> 5.0.0-rc.3' ? HOT 6
- Ambiguous use of 'map(JSONObject:)' When migrating to swift 5 and using Xcode 11.2.1 HOT 25
- Giving error when install latest version through pod HOT 4
- Mapping dynamic response from API
- Swift Package Manager manifest HOT 4
- Can not able to install version 6.2.0 using cocopod HOT 2
- when do you plan to upgrade AlamofireObjectMapper to match the new Alamofire HOT 4
- AlamofireObjectMapper - Swift Compiler Error HOT 1
- Can Apple reject the App Store upload for using rc version of Alamofire?
- Memcpy Function
- Is this project still maintained ??? HOT 4
- Ambiguous use of 'mapArray(JSONObject:)'
- send array parameters
- compile error HOT 1
- it's still working ????? i am working on this but always show some error i don't no why
- can i change this line
- letest Alamofire version missmatched.
- Request for Alamofire Dependency Update to Support Privacy Manifest in AlamofireObjectMapper
- Request for Alamofire Dependency Update to Support Privacy Manifest in AlamofireObjectMapper SDK HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alamofireobjectmapper.