Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity update submission processing errors get logged as create errors by worker #520

Closed
ktuite opened this issue Oct 9, 2023 · 1 comment · Fixed by getodk/central-backend#1027
Assignees
Labels
backend Requires a change to the API server entities Multiple Encounter workflows frontend Requires a change to the UI refactor

Comments

@ktuite
Copy link
Member

ktuite commented Oct 9, 2023

When there is an error processing a new entity from a submission, it gets logged by the entity worker as an entity.create.error error that can be shown in the submission feed.

This error logging has to be reused when there is an error processing an entity update from a submission, because the worker doesn't know if it's an update or create. (It needs to read the submission XML to figure that out, and the error could be with the XML).

On the backend, we should probably change the error so it's more generic. The main purpose of this error it to expose SOME information about how a submission entity failed to get processed, so hopefully it's ok to change it?

On the frontend, we should change the messaging so it works for any kind of submission/entity processing error.

Maybe there's something clever to be able to know if it's about a create event or update event, but that feels more complex to test and maintain, because we'd have to make it work for create, update, not sure, and any future kinds of events.

@ktuite ktuite added backend Requires a change to the API server entities Multiple Encounter workflows frontend Requires a change to the UI refactor labels Oct 9, 2023
@matthew-white
Copy link
Member

I support the idea of a single generic event rather than separate events for entity.create.error, entity.update.error, etc. Could we migrate existing entity.create.error events to generic entity.error events?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Requires a change to the API server entities Multiple Encounter workflows frontend Requires a change to the UI refactor
Projects
Status: ✅ done
Development

Successfully merging a pull request may close this issue.

2 participants