Get the error code from a Fault in iOS

I have a column in my database with a Unique Value constraint. When I go to save a record with a duplicate value in that column, I get an appropriate Fault with a Fault.message saying “Duplicate Entry ‘x’ for key…” which is appropriate. However, I want to get the appropriate error code so that I can warn the user with the right message and Fault.faultCode only comes up with “Server.processing”. How do I get the actual error code?

Hi Tom,

I am assigning it to a developer to reproduce and fix. The server always returns a numeric value, it must be a bug in the SDK that the error code is not initialized.

Mark

Internal ticket # BKNDLSS-12385

Thanks! Is this something that would require a new version of the SDK? Also, what’s the usual time frames for something like this? Hours, Days, Weeks? I’m just trying to decide if I need to create some kind of work around for the time being.

Hi Tom!

Please could you describe data structure for second use case?

Hi Kate,

I’m not sure what you mean when you say “second use case”. Can you elaborate?

–tom

Sorry, I’m misunderstood your question. Please ignore my comment.

Is this something that would require a new version of the SDK? > SDK update not required. It is server side issue.
Also, what’s the usual time frames for something like this? > This issue will be resolved in a few days (on this week).

I can confirm it’s a server side issue as the AMF returned from the server contains

faultCode
String
Server.Processing

and the faultString is also an MySQLIntegrityConstraintViolationException description, not human readable.

We updated production server.

Could you try it again?

Retested, result is now ‘1155’ [Duplicate entry] <Duplicate entry>

I have tested too and it works great! Thanks for the quick action!