About

This page explains the special functionality in the class.

Main purpose of the class

If the setting ApiExceptionHandling in the config file have been set to TRUE, and the returned answer form teh Integration Api is not an 200-OK, then the service will throw an exception, causing the corresponding client to try to resend the message at a later time. 

However, as some of the functionality in the integration api have been rushed a bit, some returned errors are creaeted in such a way that they can be recognized from the WCF Service. 

The flow in the WCF Service is as follows:

  1. An error message is returned from teh integration api upon sending a message to it
  2. The message cannot be interpeted as a successfull response
  3. The ApiExceptionHandling is set to TRUE
  4. The system looks in the ApiExceptionHelper if it should throw an exception by
    1. Gathering all known error codes to ignore (ErrorCodesExcepted in image)
    2. Iterating them
    3. Do the received error code start with the number of one of the entries?
      1. YES
        1. Dont do anything just return the message as a string to the client - client will accept the answer
      2. NO
        1. Throw exception to client - client will try to resend

If new exceptions are to be ignored, simply add the starting number to the dictionary above and a describtion. 

The error codes should start with 9000 numbers for good practice, and are determined in the integration api.