This repository was archived by the owner on Jan 2, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ pub enum Errcode {
8282 /// One or many parts of the given input did not succeed validation against
8383 /// context-specific criteria
8484 IllegalInput ,
85+ #[ display( "P2_CORE_TOKEN_REVOKED" ) ]
86+ /// The access token the client used has been invalidated, and will not be
87+ /// valid for any further requests. The client should try to retrieve a new
88+ /// token.
89+ TokenRevoked ,
8590}
8691
8792impl Errcode {
@@ -99,7 +104,8 @@ impl Errcode {
99104 "Creation of the resource is not possible, as it already exists" . to_owned ( )
100105 }
101106 Errcode :: IllegalInput => "The overall input is well-formed, but one or more of the input fields fail validation criteria" . to_owned ( ) ,
102- }
107+ Errcode :: TokenRevoked => Errcode :: TokenRevoked . to_string ( ) ,
108+ }
103109 }
104110}
105111
@@ -110,6 +116,7 @@ impl ResponseError for Errcode {
110116 Errcode :: Unauthorized => StatusCode :: UNAUTHORIZED ,
111117 Errcode :: Duplicate => StatusCode :: CONFLICT ,
112118 Errcode :: IllegalInput => StatusCode :: BAD_REQUEST ,
119+ Errcode :: TokenRevoked => StatusCode :: UNAUTHORIZED ,
113120 }
114121 }
115122}
You can’t perform that action at this time.
0 commit comments