Lucas_Werkmeister_WMDE added a comment.
I looked a bit more into the possible error types we have which don’t have more specific handlers, and I think they are: - `INVALID_ENTITY_STATE_ERROR` (`validateEntityState` action: entity has no statements for property) - `UNSUPPORTED_DATAVALUE_TYPE` (`validateBridgeApplicability` action: data type is string but data value type isn’t) - `SAVING_FAILED` (`saveBridge` action: `entitySave` failed) - `APPLICATION_LOGIC_ERROR` (`initBridge` action: any part of init failed; `setTargetValue` or `saveBridge` actions: called in wrong state; `saveBridge` action: statement mutation failed) I think the `.type` of each error is the “error code” we can use to bucket the error. (It looks like we’ve been a bit inconsistent with the spelling of these errors so far – I see both `lower_snake_case` and `SCREAMING_SNAKE_CASE` – so I would map them all to a format more suitable for Grafana, `lower-kebab-case`, with some simple `String.replace()`s.) If any error doesn’t have a `.type`, we can fall back to `"undefined"` or something like that, though if I’m not mistaken it Shouldn’t Happen™. That said, I don’t think it’s very sensible to call the errors during init – which can include loss of network connectivity, for example – “application logic errors”, so I think we should change that first, and introduce a new error type for the big `Promise.all()` in `initBridge`. (I feel like this topic rings a bell somewhere in my head, but I can’t remember if it was discussed anywhere. I don’t see anything relevant in the Git history, at least.) TASK DETAIL https://phabricator.wikimedia.org/T249120 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Lucas_Werkmeister_WMDE, Aklapper, Pablo-WMDE, Sarai-WMDE, darthmon_wmde, Michael, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs