From fabee4a1397cc7a8564ee924c0b578aaa8bf3fc7 Mon Sep 17 00:00:00 2001 From: Ming Ming Date: Thu, 7 Oct 2021 00:56:43 +0800 Subject: [PATCH] Improve HTTP404 error message --- lib/exception_util.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/exception_util.dart b/lib/exception_util.dart index e31476fa..7ae9b078 100644 --- a/lib/exception_util.dart +++ b/lib/exception_util.dart @@ -10,6 +10,8 @@ String toUserString(dynamic exception) { if (exception is ApiException) { if (exception.response.statusCode == 401) { return L10n.global().errorUnauthenticated; + } else if (exception.response.statusCode == 404) { + return "404 not found"; } else if (exception.response.statusCode == 423) { return L10n.global().errorLocked; } else if (exception.response.statusCode == 500) {