Following keys are private:
private const string MessageKey = "Message";
private const string MessageDetailKey = "MessageDetail";
private const string ModelStateKey = "ModelState";
private const string ExceptionMessageKey = "ExceptionMessage";
private const string ExceptionTypeKey = "ExceptionType";
private const string StackTraceKey = "StackTrace";
private const string InnerExceptionKey = "InnerException";
It makes it difficult for client to extract error information directly. If the string is hard coded and in the future the keys are changed, then maintaining cost is introduced.
private const string MessageKey = "Message";
private const string MessageDetailKey = "MessageDetail";
private const string ModelStateKey = "ModelState";
private const string ExceptionMessageKey = "ExceptionMessage";
private const string ExceptionTypeKey = "ExceptionType";
private const string StackTraceKey = "StackTrace";
private const string InnerExceptionKey = "InnerException";
It makes it difficult for client to extract error information directly. If the string is hard coded and in the future the keys are changed, then maintaining cost is introduced.