I have a custom Apex REST class that accepts a POST request and updates a custom object associated with the request. The inbound POST request contains an 'If-Unmodified-Since' header with the time it was sent (GMT.) Occasionally, the DML upsert operation will fail with the following error:
My question is: when the 'If-Unmodified-Since' header is included in a request to a custom Apex REST endpoint, will any DML operation fail on any record if the associated record's LastModifiedDate is after the 'If-Unmodified-Since' header date? Or is the comparison done against a different field? Is the logic different entirely?
Any information would be helpful. I can't find any documentation on this behavior.