@@ -5,16 +5,16 @@ namespace ARConsistency.Helpers
55 internal class ResponseMessage
66 {
77 internal const string Success = "Request successful." ;
8- internal const string NotFound = "Request not found. The specified uri does not exist." ;
8+ internal const string NotFound = "Request not found. The specified uri or entity does not exist." ;
99 internal const string BadRequest = "Request invalid." ;
1010 internal const string MethodNotAllowed = "Request responded with 'Method Not Allowed'." ;
1111 internal const string NotContent = "Request no content. The specified uri does not contain any content." ;
1212 internal const string Exception = "Request responded with exceptions." ;
13- internal const string UnAuthorized = "Request denied. Unauthorized access ." ;
13+ internal const string UnAuthorized = "Access denied." ;
1414 internal const string ValidationError = "Request responded with validation error(s). Please correct the specified validation errors and try again." ;
15- internal const string Unhandled = "Unhandled Exception occurred. Unable to process the request ." ;
15+ internal const string Unhandled = "An unhandled exception was thrown by the application ." ;
1616
17- internal static string GetResponseMessageByStatusCode ( int statusCode ) =>
17+ internal static string GetResponseMessageByStatusCode ( int ? statusCode ) =>
1818 statusCode switch
1919 {
2020 StatusCodes . Status200OK => ResponseMessage . Success ,
@@ -24,7 +24,7 @@ internal static string GetResponseMessageByStatusCode(int statusCode) =>
2424 StatusCodes . Status404NotFound => ResponseMessage . NotFound ,
2525 StatusCodes . Status405MethodNotAllowed => ResponseMessage . MethodNotAllowed ,
2626 StatusCodes . Status500InternalServerError => ResponseMessage . Unhandled ,
27- _ => null
27+ _ => ResponseMessage . Unhandled
2828 } ;
2929 }
3030}
0 commit comments