feat(connector): add health.incidents - #110
Open
Gabrielpanga wants to merge 1 commit into
Open
Conversation
Mirrors the field now returned by the API: the incidents affecting a connector right now, each with a customer-facing title, a type, the affected product, severity, state and a permalink to the status page. Null when the connector has no active incident, so its presence is the signal. It describes the institution, not the caller's own connections. `status` says whether you can connect at all; this says what is wrong, and a bank can be perfectly reachable while failing to return instalments. `type` is an enum following the ConnectorStatus pattern — @SerializedName per value, Lombok @Getter on the backing string. A value added server-side after this release deserializes as null under Gson, which is honest; OTHER is a real value meaning Pluggy has not classified the incident, not that nothing is wrong. `product` stays a String: its values (pis-agendado) do not map cleanly, and an unrecognised one would deserialize to null, which is worse than the raw string.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirrors the field now returned by the API: the incidents affecting a connector right now.
Each incident carries a customer-facing
title, atype, the affectedproduct,severity,state,startedAtand aurlpermalink to the status page.incidentsis null when the connector has no active incident, so its presence is the signal. It describes the institution, not the caller's own connections —statussays whether you can connect at all, this says what is wrong, and a bank can be perfectly reachable while failing to return instalments.Two modelling choices
typeis an enum, following theConnectorStatuspattern in this package —@SerializedNameper value, Lombok@Getteron the backing string. A value added server-side after this release deserializes asnullunder Gson, which is honest. NoteOTHERis a real value meaning Pluggy has not classified the incident, not that nothing is wrong.productstays aString. Its values includepis-agendado, and an unrecognised one would deserialize tonull— worse than just handing back the raw string.Verification
mvn -o compilefrom a clearedtarget/classes: 114 source files, BUILD SUCCESS.Context: the API side shipped in
v0.695.0. Same change in pluggyai/pluggy-node#179 and pluggyai/pluggy-net#43.