Open 0xTomTom opened 7 years ago
Hi Tom,
You can easily tell OBPMarshal to expect a different container type (or no container type) using the OBPMarshalOptionExpectClass
options key:
session.marshal.getResourceAtAPIPath("my/accounts",
withOptions: [ OBPMarshalOptionExpectClass : NSArray.self ],
forResultHandler: resultHandler, orErrorHandler: errorHandler)
...and there are more options for handling unusual cases here: https://github.com/OpenBankProject/OBPKit-iOSX#customising-obpmarshal-behaviour
If you find more uncatered-for edge cases, let me know. 😊
When performing a default OBPMarshal request with getResourceAtAPIPath to "my/accounts", the
HandleOBPMarshalError
is called with the following:The response seems valid and expected, but isn't usable as the MarshalError is called in stead of
HandleOBPMarshalData
I've used the following:
let serverBase = "https://apisandbox.openbankproject.com/obp/v3.0.0/"
session.marshal.getResourceAtAPIPath("my/accounts", withOptions: nil, forResultHandler: resultHandler, orErrorHandler: errorHandler)