@@ -265,6 +265,16 @@ pub enum StatusCode {
265
265
/// The request was well-formed but was unable to be followed due to semantic errors.
266
266
UnprocessableEntity = 422 ,
267
267
268
+ /// 423 Locked
269
+ ///
270
+ /// The resource that is being accessed is locked.
271
+ Locked = 423 ,
272
+
273
+ /// 424 Failed Dependency
274
+ ///
275
+ /// The request failed because it depended on another request and that request failed (e.g., a PROPPATCH).
276
+ FailedDependency = 424 ,
277
+
268
278
/// 425 Too Early
269
279
///
270
280
/// Indicates that the server is unwilling to risk processing a request that might be replayed.
@@ -349,6 +359,16 @@ pub enum StatusCode {
349
359
/// point in the negotiation process.
350
360
VariantAlsoNegotiates = 506 ,
351
361
362
+ /// 507 Insufficient Storage
363
+ ///
364
+ /// The server is unable to store the representation needed to complete the request.
365
+ InsufficientStorage = 507 ,
366
+
367
+ /// 508 Loop Detected
368
+ ///
369
+ /// The server detected an infinite loop while processing the request.
370
+ LoopDetected = 508 ,
371
+
352
372
/// 510 Not Extended
353
373
///
354
374
/// Further extensions to the request are required for the server to fulfil it.
@@ -447,6 +467,8 @@ impl StatusCode {
447
467
StatusCode :: ImATeapot => "I'm a teapot" ,
448
468
StatusCode :: MisdirectedRequest => "Misdirected Request" ,
449
469
StatusCode :: UnprocessableEntity => "Unprocessable Entity" ,
470
+ StatusCode :: Locked => "Locked" ,
471
+ StatusCode :: FailedDependency => "Failed Dependency" ,
450
472
StatusCode :: TooEarly => "Too Early" ,
451
473
StatusCode :: UpgradeRequired => "Upgrade Required" ,
452
474
StatusCode :: PreconditionRequired => "Precondition Required" ,
@@ -460,6 +482,8 @@ impl StatusCode {
460
482
StatusCode :: GatewayTimeout => "Gateway Timeout" ,
461
483
StatusCode :: HttpVersionNotSupported => "HTTP Version Not Supported" ,
462
484
StatusCode :: VariantAlsoNegotiates => "Variant Also Negotiates" ,
485
+ StatusCode :: InsufficientStorage => "Insufficient Storage" ,
486
+ StatusCode :: LoopDetected => "Loop Detected" ,
463
487
StatusCode :: NotExtended => "Not Extended" ,
464
488
StatusCode :: NetworkAuthenticationRequired => "Network Authentication Required" ,
465
489
}
@@ -516,6 +540,8 @@ impl std::convert::TryFrom<u16> for StatusCode {
516
540
418 => Ok ( StatusCode :: ImATeapot ) ,
517
541
421 => Ok ( StatusCode :: MisdirectedRequest ) ,
518
542
422 => Ok ( StatusCode :: UnprocessableEntity ) ,
543
+ 423 => Ok ( StatusCode :: Locked ) ,
544
+ 424 => Ok ( StatusCode :: FailedDependency ) ,
519
545
425 => Ok ( StatusCode :: TooEarly ) ,
520
546
426 => Ok ( StatusCode :: UpgradeRequired ) ,
521
547
428 => Ok ( StatusCode :: PreconditionRequired ) ,
@@ -529,6 +555,8 @@ impl std::convert::TryFrom<u16> for StatusCode {
529
555
504 => Ok ( StatusCode :: GatewayTimeout ) ,
530
556
505 => Ok ( StatusCode :: HttpVersionNotSupported ) ,
531
557
506 => Ok ( StatusCode :: VariantAlsoNegotiates ) ,
558
+ 507 => Ok ( StatusCode :: InsufficientStorage ) ,
559
+ 508 => Ok ( StatusCode :: LoopDetected ) ,
532
560
510 => Ok ( StatusCode :: NotExtended ) ,
533
561
511 => Ok ( StatusCode :: NetworkAuthenticationRequired ) ,
534
562
_ => crate :: bail!( "Invalid status code" ) ,
0 commit comments