I am planning an EDI system that sends, among other things, an XML confirmation message containing several elements, but specifically these three; ErrorCode, ErrorSeverity and ErrorDescription.
Basically, I will parse the incoming XML message, and depending on the success or failure of the parsing, include message formatting, syntax, structure, validity, and some business rules. I will return either to success or to confirmation of failure.
I have fluency to select ErrorCodes, ErrorSeverity and ErrorDescription, but instead of naively starting with ErrorCode [1], ErrorSeverity [Error], ErrorDescription [Unable to find the incoming XML file] and add errors as I think of them in I was wondering if the encoding time in the parser for incoming messages was there any best practice for choosing error and severity codes?
I know that HTTP error codes are similar to 2xx for OK messages, 4xx for specific errors, 5xx for server errors, etc., and wondered if anyone has any good suggestions that could help me along the way. before I roll myself into a corner and say "if only all my" warning "errors started with 3 or something like that!
I think that ErrorSeverity will not be much larger than [Error], [Warning], [Info] and [OK], maybe?
Thanks.
source share