Skip to content

FUND-2345 DRC-500-error on DELETE (DocumentKenmerkenResolver)#144

Merged
heuvea merged 1 commit intomainfrom
bugfix/FUND-2345-DRC-500-error-on-DELETE-DocumentKenmerkenResolver
Jan 23, 2026
Merged

FUND-2345 DRC-500-error on DELETE (DocumentKenmerkenResolver)#144
heuvea merged 1 commit intomainfrom
bugfix/FUND-2345-DRC-500-error-on-DELETE-DocumentKenmerkenResolver

Conversation

@heuvea
Copy link
Copy Markdown
Contributor

@heuvea heuvea commented Jan 22, 2026

Pull Request

Description

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

Related Issues

Testing

  • Tests pass
  • Manual testing completed

Checklist

  • Self-review completed
  • Documentation updated (if needed)

Copilot AI review requested due to automatic review settings January 22, 2026 13:47
@heuvea heuvea added Bug Something isn't working Documenten API Related to Documenten (DRC) component labels Jan 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a production issue (FUND-2345) where a DRC-500 error occurs during DELETE operations in DocumentKenmerkenResolver. The root cause is a null LatestEnkelvoudigInformatieObjectVersie foreign key reference that occurs in production environments.

Changes:

  • Added defensive null-checking workaround in multiple LockEnkelvoudigInformatieObjectCommandHandler files (v1, v1.1, v1.5) to restore the latest version when null
  • Refactored DocumentKenmerkenResolver.GetKenmerkenAsync to handle null LatestEnkelvoudigInformatieObjectVersie by falling back to the latest version from the collection

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
src/OneGround.ZGW.Documenten.Web/Handlers/v1/LockEnkelvoudigInformatieObjectCommandHandler.cs Added null check and restore logic for LatestEnkelvoudigInformatieObjectVersie with warning log
src/OneGround.ZGW.Documenten.Web/Handlers/v1/5/LockEnkelvoudigInformatieObjectCommandHandler.cs Added identical null check and restore logic as v1 handler
src/OneGround.ZGW.Documenten.Web/Handlers/v1/1/LockEnkelvoudigInformatieObjectCommandHandler.cs Added identical null check and restore logic as v1 handler
src/OneGround.ZGW.Documenten.Web/Handlers/DocumentKenmerkenResolver.cs Introduced null-coalescing fallback to compute latest version when LatestEnkelvoudigInformatieObjectVersie is null

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@heuvea heuvea merged commit 0bf8280 into main Jan 23, 2026
6 checks passed
@heuvea heuvea deleted the bugfix/FUND-2345-DRC-500-error-on-DELETE-DocumentKenmerkenResolver branch January 23, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Documenten API Related to Documenten (DRC) component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants