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.
Comments: Yes, we should expose those strings on the HttpError or make sure those properties can be accessed.
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.
Comments: Yes, we should expose those strings on the HttpError or make sure those properties can be accessed.