Mercurial > prosody-modules
comparison mod_sentry/sentry.lib.lua @ 5008:bd63feda3704
Merge role-auth
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 22 Aug 2022 15:39:02 +0100 |
| parents | cb3de818ff55 |
| children |
comparison
equal
deleted
inserted
replaced
| 4994:cce12a660b98 | 5008:bd63feda3704 |
|---|---|
| 219 local function resolve_sentry_response(response) | 219 local function resolve_sentry_response(response) |
| 220 if response.code == 200 and response.body then | 220 if response.code == 200 and response.body then |
| 221 local data = json.decode(response.body); | 221 local data = json.decode(response.body); |
| 222 return data; | 222 return data; |
| 223 end | 223 end |
| 224 module:log("warn", "Unexpected response from server: %d: %s", response.code, response.body); | |
| 224 return promise.reject(response); | 225 return promise.reject(response); |
| 225 end | 226 end |
| 226 | 227 |
| 227 function sentry_mt:send(event) | 228 function sentry_mt:send(event) |
| 228 local json_payload = json.encode(event); | 229 local json_payload = json.encode(event); |
