cozy / cozy-doctypes

The doctypes used in cozy-stack
https://docs.cozy.io/en/cozy-doctypes/docs/
GNU Affero General Public License v3.0
2 stars 29 forks source link

Add discardedErrors to triggers #122

Closed y-lohse closed 4 years ago

y-lohse commented 4 years ago

We are going to add a feature on the homepage where konnector errors can be muted. The konnector will still be shown as "errored", but the error message won't be highlighted.

We only want to mute the specific type of error that is displayed, and in case the problem is muted, fixed and then occurs again, we want to highlight the error again.
This is why we store 2 things, the error code and the last successful run at the time of the mute. If the same error is detected but the lastSuccessDate is older than the last_success field of the trigger's current_state, we need to highlight the error again.

Let me know what you think and if you see a better way to store this info.

nono commented 4 years ago

@y-lohse I'd prefer to add this to the io.cozy.accounts, not on the triggers. The triggers can be used for more things that just the konnectors, and currently, there are no routes to update a trigger.

y-lohse commented 4 years ago

I can confirm that the format as described in this PR works as intended. If it's ok for you we can merge this PR.