1
0
mirror of https://github.com/zedeus/nitter.git synced 2026-05-12 23:32:57 -04:00

Simplify new error handling

This commit is contained in:
Zed
2022-01-16 18:28:40 +01:00
parent 3d91ae0256
commit fff04de24b
4 changed files with 12 additions and 7 deletions
+2 -2
View File
@@ -18,5 +18,5 @@ proc getImageUrl*(url: string): string =
template handleErrors*(body) =
if json.startsWith("{\"errors"):
let error {.inject.} = json.fromJson(Errors).errors[0].code
body
for error {.inject.} in json.fromJson(Errors).errors:
body