Skip to content

Conversation

@janbritz
Copy link
Contributor

@janbritz janbritz commented Dec 4, 2025

Closes #194

TODO:

  • Anpassung der QPPE (erfolgt wenn PR angenommen wurde)

)


class MigrationError(web.HTTPUnprocessableEntity, _ExceptionMixin):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In der QPPE hatte ich ursprünglich eine eigene Datenstruktur QuestionStateMigrationError vorgesehen mit einer etwas genaueren Unterteilung des error_code und einem optionalen reason, um mehr darüber zu erfahren, warum die Migration nicht möglich ist.

        error_code:
          type: string
          enum:
            - NOT_IMPLEMENTED
            - DOWNGRADE_NOT_POSSIBLE
            - PACKAGE_MISMATCH
            - CURRENT_QUESTION_STATE_INVALID
            - MAJOR_VERSION_MISMATCH
            - OTHER_ERROR

Ich denke, dass wir innerhalb von RequestErrorCode keine weiteren Unterscheidungen vorsehen sollten. Eventuell führen wir ein neues Attribut hinzu, das einen genaueren Error-Code angibt? Fallen dir eigentlich weitere Codes ein?
Eventuell ist aber diese Differenzierung aber auch gar nicht notwendig. CURRENT_QUESTION_STATE_INVALID wird mittlerweile schon durch RequestErrorCode.INVALID_QUESTION_STATE abgedeckt. Wenn ein reason mitgeschickt wird, dann können Admins und Lehrende ja im Zweifel eh besser darüber informiert werden, was passiert ist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paket-Migrationen

3 participants