title: Best way of mapping external error codes to internal codes
body: <p>What I mean is that if we get an error code 300 from some service, and need to map it to our own internal error code (say 450), then whats the best way of doing this.</p>
  
  <p>Current system uses constants to keep track of internal errors:</p>
  
  <pre><code>public const string ERROR_SOME = "450"; public const string ERROR_ANOTHER = "460";...
  </code></pre>
  
  <p>So I was thinking of just having another set of constants for external errors and then have function for mapping the two:</p>
  
  <pre><code>public const string EXT_ERROR_SOME = "300";
  public const string EXT_ERROR_ANOTHER = "800";
  ...
  public string MapError(string externalError)
  {
      if(externalError == EXT_ERROR_SOME) // can be a switch statement
           return ERROR_SOME;
      else if (externalError == EXT_ERROR_ANOTHER)
           return ERROR_ANOTHER;
      ...
  }
  </code></pre>
  
  <p>The question is: <strong>"Is there a better way"?</strong></p>