This repository was archived by the owner on Aug 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using System ;
22
33namespace PowerUtils . Net . Constants
4- { // DONE
4+ {
55 // Reference: https://github.com/ofpinewood/http-exceptions/blob/main/src/Opw.HttpExceptions/ResponseStatusCodeLink.cs
66
77 /// <summary>
@@ -29,6 +29,7 @@ public static class StatusCodeLink
2929 public const string UNSUPPORTED_MEDIA_TYPE = "https://tools.ietf.org/html/rfc7231#section-6.5.13" ;
3030 public const string REQUESTED_RANGE_NOT_SATISFIABLE = "https://tools.ietf.org/html/rfc7233#section-4.4" ;
3131 public const string EXPECTATION_FAILED = "https://tools.ietf.org/html/rfc7231#section-6.5.14" ;
32+ public const string UNPROCESSABLE_ENTITY = "https://tools.ietf.org/doc/html/rfc7231#section-6.5" ;
3233 public const string UPGRADE_REQUIRED = "https://tools.ietf.org/html/rfc7231#section-6.5.15" ;
3334 public const string INTERNAL_SERVER_ERROR = "https://tools.ietf.org/html/rfc7231#section-6.6.1" ;
3435 public const string NOT_IMPLEMENTED = "https://tools.ietf.org/html/rfc7231#section-6.6.2" ;
@@ -65,6 +66,7 @@ public static string GetStatusCodeLink(this int statuCode)
6566 415 => UNSUPPORTED_MEDIA_TYPE ,
6667 416 => REQUESTED_RANGE_NOT_SATISFIABLE ,
6768 417 => EXPECTATION_FAILED ,
69+ 422 => UNPROCESSABLE_ENTITY ,
6870 426 => UPGRADE_REQUIRED ,
6971
7072 // 5XX
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ public class StatusCodeLinksTests
2727 [ InlineData ( 415 , StatusCodeLink . UNSUPPORTED_MEDIA_TYPE ) ]
2828 [ InlineData ( 416 , StatusCodeLink . REQUESTED_RANGE_NOT_SATISFIABLE ) ]
2929 [ InlineData ( 417 , StatusCodeLink . EXPECTATION_FAILED ) ]
30+ [ InlineData ( 422 , StatusCodeLink . UNPROCESSABLE_ENTITY ) ]
3031 [ InlineData ( 426 , StatusCodeLink . UPGRADE_REQUIRED ) ]
3132 [ InlineData ( 500 , StatusCodeLink . INTERNAL_SERVER_ERROR ) ]
3233 [ InlineData ( 501 , StatusCodeLink . NOT_IMPLEMENTED ) ]
You can’t perform that action at this time.
0 commit comments