Repository navigation
v3.7.2
Added
- Jackson-aware 4xx error translation.
_raise_for_statusin the HTTP client now matches LogicMonitor's raw Jackson deserialization errors (Cannot construct instance of ...$Period,Cannot deserialize value of type ...ArrayList<...Recipient...> from Object,invalid recipient for stage N,admin<N> is not found,invalid method <...> for type ARBITRARY) against a small translation table and rewrites them into actionableLMError.message+LMError.suggestionvalues. The raw server text is preserved onLMError.detailsso debugging context is not lost. Five starter patterns; the table is designed to grow as new shapes are seen in the wild. LMError.details-- new optional field on the base exception. Surfaced byto_dict()when set. Carries the raw untranslated server message for callers that want to inspect it (logs, debuggers, follow-up tooling).- Integration-shorthand recipient in
create_escalation_chainandupdate_escalation_chaindestinations. Recipients of the form{type: "integration", integration_name: "<display name>", admin: "<username>"}are rewritten to the canonical{type: "admin", addr: "<username>", method: "<display name>"}form before the request is sent.method/addraliases are also accepted.integration_idalone is explicitly rejected with an actionable error -- the display name and owning admin must be passed (useget_integrationto look them up).
Rationale
Wiring LogicMonitor escalation chains used to fail with multi-line Java stack traces like "Cannot construct instance of com.santaba.server.servlet.rest.v3.pojos.setting.alert.RestEscalatingChainV3$Period" because the LM v3 API forwards Jackson's raw deserialization errors to API clients. That wording names internal POJOs and teaches callers nothing about the fix. After v3.7.2, the same 400 response comes back as "destinations[].period must be null or a Period object" plus a concrete example, and the integration-shorthand rewrite means callers never have to discover the non-obvious admin+method form in the first place.