storeJSONEvent stores a plain JSON error event in structured tables.
(body []byte, project string)
| 85 | |
| 86 | // storeJSONEvent stores a plain JSON error event in structured tables. |
| 87 | func (h *handler) storeJSONEvent(body []byte, project string) { |
| 88 | if h.db == nil { |
| 89 | return |
| 90 | } |
| 91 | |
| 92 | var ev ErrorEvent |
| 93 | if err := json.Unmarshal(body, &ev); err != nil { |
| 94 | return |
| 95 | } |
| 96 | |
| 97 | if _, err := storeErrorEvent(h.db, &ev, body, project); err != nil { |
| 98 | slog.Warn("sentry: failed to store structured error event", "err", err) |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | // handleEnvelope parses Sentry envelope format and routes each item |
| 103 | // to the appropriate storage function. |
no test coverage detected