mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-02 06:46:22 +01:00
Readable error for HTTP423
This commit is contained in:
parent
e9c22a8415
commit
9fe2c41269
2 changed files with 6 additions and 0 deletions
|
@ -11,6 +11,8 @@ String toUserString(dynamic exception, BuildContext context) {
|
|||
if (exception is ApiException) {
|
||||
if (exception.response.statusCode == 401) {
|
||||
return AppLocalizations.of(context).errorUnauthenticated;
|
||||
} else if (exception.response.statusCode == 423) {
|
||||
return AppLocalizations.of(context).errorLocked;
|
||||
}
|
||||
} else if (exception is SocketException) {
|
||||
return AppLocalizations.of(context).errorDisconnected;
|
||||
|
|
|
@ -347,5 +347,9 @@
|
|||
"errorDisconnected": "Unable to connect. Server may be offline or your device may be disconnected",
|
||||
"@errorDisconnected": {
|
||||
"description": "Error message when the app can't connect to the server"
|
||||
},
|
||||
"errorLocked": "File is locked on server. Please try again later",
|
||||
"@errorLocked": {
|
||||
"description": "Error message when server responds with HTTP423"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue