SAT retry logic for connection errors (500s codes)

The SAT organization within Syncfy has several sites that allow us to obtain fiscal information from SAT, such as CFDI´s, Declaraciones, Retenciones, among others.

The SAT portal often experiences intermittent issues which, at times, create conflicts when trying to synchronize with any SAT-related site, resulting in connection errors.

These connection errors are categorized with the following codes:

Code Name Description
500 Error An internal error occurred while connecting to the institution.
501 Unavailable The institution has reported a connection problem. Please wait 15 minutes and try again. If the issue persists, contact Technical Support.
504 Connection Timeout An internal error occurred while connecting to the institution.
509 Undergoing Maintenance The institution is undergoing maintenance.

For more information about status codes, please refer to the following resource: Syncfy Status Codes


For connection errors, Syncfy employs a retry logic to ensure the synchronization of credentials as long as they are authorized.

How can we determine if a credential is authorized?

To do so, it is important to understand the flow of status codes for an executed credential:
image

  • If it is not the first time the synchronization is executed and the last execution was successful (200s codes)

  • If the credential flow was: 100 :arrow_right: 101 :arrow_right: 102 :arrow_right: 500s (indicating that the credentials were authenticated correctly, that is, logged in, but there was a connection error when retrieving the information).

How does the retry logic work within Syncfy?

  • If the synchronization ends with 500 , it indicates that an adjustment in the connection is likely required. Syncfy automatically creates a ticket for review, and the retry will be performed automatically the following day.
  • If the synchronization ends with 501 , it indicates momentary failures of the portal, so retries will be made automatically at approximately 5-minute intervals (retrying 1 minute later, and if it fails again, retrying 5 minutes later, and so on).
  • If the synchronization ends with 504 , it indicates that an adjustment in the connection is likely required. Syncfy automatically creates a ticket for review, and the retry will be performed automatically the following day.
  • If the synchronization ends with 509 , it indicates that the portal is undergoing maintenance. It is highly likely that changes in the portal require adjustments from