diff --git a/lib/exception_util.dart b/lib/exception_util.dart index 473dcae8..d843fa64 100644 --- a/lib/exception_util.dart +++ b/lib/exception_util.dart @@ -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; diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 5d75cf9e..a8a4f816 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -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" } } \ No newline at end of file