Project

General

Profile

Appendix IV: Status Codes Returned by getNextFileURI()

  0 - SUCCESS          - The uri string returned is now valid for use 
202 - TRY_AGAIN_LATER  - The waitTime return contains a suggested delay
204 - NO_MORE_FILES    - All URI's in the requested dataset have been delivered
400 - BAD_REQUEST      - Problem with request parameters *
403 - FORBIDDEN        - Insufficient privilege *
404 - NOT_FOUND        - dbserver or a file relevant to the data set not found*
409 - CONFLICT         - Some sort of duplication issue *
410 - GONE             - Process not running *
500 - SERVER_EXCEPTION - Exception of unspecified type; re-tryable
502 - BAD_GATEWAY      - Some sort of Corba or DB exception; re-tryable 
503 - UNAVAILABLE      - Some resource exceeded availability; re-tryable
504 - SPECIFIC_ERRORS  - Ping failure, etc.; re-tryable

The codes marked * should be treated as fatal, as should ALL codes between 
400 and 499.  The codes between 500 and 599 should be treated as re-tryable.

I would suggest this ought to be self-documenting in an enum 
art::FileDeliveryStatus.  Since in principle we cannot anticipate all possible 
codes generated by the POST command, the method should return an int.