I'm debugging an issue where our customer's iOS app (which makes REST API calls to Salesforce via the SDK) is encountering data sync errors. We believe the API is returning error messages but they are not properly surfacing in the iOS app.
I tried enabling a trace flag for the user in question, using the default SFDC_DevConsole logging level. What I saw was, only the successful CRUD operations generated debug logs. The ones that failed did not generate any log at all so I could not see the error messages from the Salesforce side.
I tested this out manually as well. I started a trace flag on myself, opened up Workbench, and made a successful REST API call that updated a Contact. I could see a debug log for that one. Then I tried some bad calls: one that attempted to update a nonexistent field, and another that attempted to update an Email field with an invalid Email address. In both cases I got an error back from the API, but neither operation generated a Debug log.
Is there any way to get logs of these errors from the Salesforce side or can the logs only be known from the iOS side?