Refactor error handling and response handling in BatchHTTP module
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user