Skip to content

Commit

Permalink
Add handling for 'Connection refused' HTTP status code in localizatio…
Browse files Browse the repository at this point in the history
…n and response builder
  • Loading branch information
frankmer committed Jan 16, 2025
1 parent 94cc6d4 commit 999e50b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,7 @@
"exampleUrl": "Please enter a valid URL like: \"https://example.com/\"",
"expandLockedFolder": "Please authenticate to uncollapse the locked folder.",
"export": "Export",
"httpStatus" : "{httpCode, select, 100{{httpCode}: Continue} 101{{httpCode}: Switching Protocols} 102{{httpCode}: Processing} 103{{httpCode}: Early Hints} 104{{httpCode}: Connection Reset By Peer} 200{{httpCode}: OK} 201{{httpCode}: Created} 202{{httpCode}: Accepted} 203{{httpCode}: Non-Authoritative Information} 204{{httpCode}: No Content} 205{{httpCode}: Reset Content} 206{{httpCode}: Partial Content} 207{{httpCode}: Multi-Status} 208{{httpCode}: Already Reported} 300{{httpCode}: Multiple Choices} 301{{httpCode}: Moved Permanently} 302{{httpCode}: Found} 303{{httpCode}: See Other} 304{{httpCode}: Not Modified} 305{{httpCode}: Use Proxy} 307{{httpCode}: Temporary Redirect} 308{{httpCode}: Permanent Redirect} 400{{httpCode}: Bad Request} 401{{httpCode}: Unauthorized} 402{{httpCode}: Payment Required} 403{{httpCode}: Forbidden} 404{{httpCode}: Not Found} 405{{httpCode}: Method Not Allowed} 406{{httpCode}: Not Acceptable} 407{{httpCode}: Proxy Authentication Required} 408{{httpCode}: Request Timeout} 409{{httpCode}: Conflict} 410{{httpCode}: Gone} 411{{httpCode}: Length Required} 412{{httpCode}: Precondition Failed} 413{{httpCode}: Payload Too Large} 414{{httpCode}: Request-URI Too Long} 415{{httpCode}: Unsupported Media Type} 416{{httpCode}: Requested Range Not Satisfiable} 417{{httpCode}: Expectation Failed} 418{{httpCode}: I'm a teapot} 420{{httpCode}: Enhance Your Calm} 421{{httpCode}: Misdirected Request} 422{{httpCode}: Unprocessable Entity} 423{{httpCode}: Locked} 424{{httpCode}: Failed Dependency} 426{{httpCode}: Upgrade Required} 428{{httpCode}: Precondition Required} 429{{httpCode}: Too Many Requests} 431{{httpCode}: Request Header Fields Too Large} 444{{httpCode}: Connection Closed Without Response} 451{{httpCode}: Unavailable For Legal Reasons} 499{{httpCode}: Client Closed Request} 500{{httpCode}: Internal Server Error} 501{{httpCode}: Not Implemented} 502{{httpCode}: Bad Gateway} 503{{httpCode}: Service Unavailable} 504{{httpCode}: Gateway Timeout} 505{{httpCode}: HTTP Version Not Supported} 506{{httpCode}: Variant Also Negotiates} 507{{httpCode}: Insufficient Storage} 508{{httpCode}: Loop Detected} 510{{httpCode}: Not Extended} 511{{httpCode}: Network Authentication Required} 520{{httpCode}: Unknown Error} 521{{httpCode}: Web Server Is Down} 522{{httpCode}: Connection Timed Out} 523{{httpCode}: Origin Is Unreachable} 524{{httpCode}: A Timeout Occurred} 525{{httpCode}: Handshake Failed} 526{{httpCode}: Invalid SSL Certificate} 527{{httpCode}: Railgun Error} 528{{httpCode}: Transport Error} 529{{httpCode}: Service is Overloaded} 530{{httpCode}: Site is Frozen} 599{{httpCode}: Network Connect Timeout Error} other{{httpCode}: Unknown Error}}",
"httpStatus" : "{httpCode, select, 100{{httpCode}: Continue} 101{{httpCode}: Switching Protocols} 102{{httpCode}: Processing} 103{{httpCode}: Early Hints} 104{{httpCode}: Connection Reset By Peer} 111{{httpCode}: Connection refused} 200{{httpCode}: OK} 201{{httpCode}: Created} 202{{httpCode}: Accepted} 203{{httpCode}: Non-Authoritative Information} 204{{httpCode}: No Content} 205{{httpCode}: Reset Content} 206{{httpCode}: Partial Content} 207{{httpCode}: Multi-Status} 208{{httpCode}: Already Reported} 300{{httpCode}: Multiple Choices} 301{{httpCode}: Moved Permanently} 302{{httpCode}: Found} 303{{httpCode}: See Other} 304{{httpCode}: Not Modified} 305{{httpCode}: Use Proxy} 307{{httpCode}: Temporary Redirect} 308{{httpCode}: Permanent Redirect} 400{{httpCode}: Bad Request} 401{{httpCode}: Unauthorized} 402{{httpCode}: Payment Required} 403{{httpCode}: Forbidden} 404{{httpCode}: Not Found} 405{{httpCode}: Method Not Allowed} 406{{httpCode}: Not Acceptable} 407{{httpCode}: Proxy Authentication Required} 408{{httpCode}: Request Timeout} 409{{httpCode}: Conflict} 410{{httpCode}: Gone} 411{{httpCode}: Length Required} 412{{httpCode}: Precondition Failed} 413{{httpCode}: Payload Too Large} 414{{httpCode}: Request-URI Too Long} 415{{httpCode}: Unsupported Media Type} 416{{httpCode}: Requested Range Not Satisfiable} 417{{httpCode}: Expectation Failed} 418{{httpCode}: I'm a teapot} 420{{httpCode}: Enhance Your Calm} 421{{httpCode}: Misdirected Request} 422{{httpCode}: Unprocessable Entity} 423{{httpCode}: Locked} 424{{httpCode}: Failed Dependency} 426{{httpCode}: Upgrade Required} 428{{httpCode}: Precondition Required} 429{{httpCode}: Too Many Requests} 431{{httpCode}: Request Header Fields Too Large} 444{{httpCode}: Connection Closed Without Response} 451{{httpCode}: Unavailable For Legal Reasons} 499{{httpCode}: Client Closed Request} 500{{httpCode}: Internal Server Error} 501{{httpCode}: Not Implemented} 502{{httpCode}: Bad Gateway} 503{{httpCode}: Service Unavailable} 504{{httpCode}: Gateway Timeout} 505{{httpCode}: HTTP Version Not Supported} 506{{httpCode}: Variant Also Negotiates} 507{{httpCode}: Insufficient Storage} 508{{httpCode}: Loop Detected} 510{{httpCode}: Not Extended} 511{{httpCode}: Network Authentication Required} 520{{httpCode}: Unknown Error} 521{{httpCode}: Web Server Is Down} 522{{httpCode}: Connection Timed Out} 523{{httpCode}: Origin Is Unreachable} 524{{httpCode}: A Timeout Occurred} 525{{httpCode}: Handshake Failed} 526{{httpCode}: Invalid SSL Certificate} 527{{httpCode}: Railgun Error} 528{{httpCode}: Transport Error} 529{{httpCode}: Service is Overloaded} 530{{httpCode}: Site is Frozen} 599{{httpCode}: Network Connect Timeout Error} other{{httpCode}: Unknown Error}}",
"@httpStatus": {
"description": "HTTP status code",
"placeholders": {
Expand Down
2 changes: 2 additions & 0 deletions lib/utils/privacyidea_io_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ extension ResponseBuilder on Response {
'Processing': 102,
'Early Hints': 103,
'Connection Reset By Peer': 104,
'Connection refused': 111,
'OK': 200,
'Created': 201,
'Accepted': 202,
Expand Down Expand Up @@ -292,6 +293,7 @@ extension ResponseBuilder on Response {
102: 'Processing',
103: 'Early Hints',
104: 'Connection Reset By Peer',
111: 'Connection refused',
200: 'OK',
201: 'Created',
202: 'Accepted',
Expand Down

0 comments on commit 999e50b

Please sign in to comment.