added handling for 404 grade colors

This commit is contained in:
Kima
2024-05-15 20:42:00 +02:00
parent 30f24d5d33
commit 84537fdcef
2 changed files with 59 additions and 4 deletions

View File

@@ -336,6 +336,8 @@ class FilcAPI {
if (res.statusCode == 200) {
return (jsonDecode(res.body) as Map);
} else if (res.statusCode == 404) {
return {"public_id": ""};
} else {
throw "HTTP ${res.statusCode}: ${res.body}";
}