We have a function that opens a CSV file, loops thru all records and uploads each record to a web site thru an API call.
Now we realized some time that site is offline and would like to add to the existing error routine below logic that if error number is 503 then it should wait a minute and try again call that API (the command that caused to throw the error).
Select Case Err.Number
'' display a message if you want
Resume Next '''' assuming you want to just pick up at the statement after the error
s = "Insert into API_Errors(ErrorMessage,TableName, [TableID],FileName, ValuesSent) Values ('" & Err.Number & "--" & Err.Description & "','" & sTable & "'," & Nz(pk, "") & ",'" & sFile & "','') "
' MsgBox Err.Number & "--" & Err.Description, vbOKOnly
' Resume ExitImportDataToCaspio
PS. for a detailed description of the function in question see here