Refactor error handling and response handling in BatchHTTP module

This commit is contained in:
Aaro Varis
2024-09-29 18:41:37 +03:00
parent f1f53c9b85
commit bae17a9b9a
2 changed files with 21 additions and 10 deletions

View File

@@ -91,7 +91,12 @@ function DoRequest(request)
end
end
print("[BatchHTTP] got response",id)
if response.error then
warn('[BatchHTTP] request '..id..' errored "'..response.error.message..'"')
else
print("[BatchHTTP] got response "+response.status,id)
end
return response.data
end