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

Corretly report 409 conflict when collection creation is cancelled on error but other resources started to point to it in the meantime. #43

Closed
zozlak opened this issue Feb 14, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@zozlak
Copy link
Member

zozlak commented Feb 14, 2025

It is possible that during the collection creation which will fail at the end (especially on a handle as this happens very late) another resource is created which points to it. In such a case the call to RC::$transaction->deleteResource($this->id); in the Resource::postCollectionMetadata() throws a database foreign key check violation error which leads to a cryptic HTTP 500 while it should be reported as an original error which lead to the resource creation cancellation.

@zozlak zozlak added the bug Something isn't working label Feb 14, 2025
@zozlak zozlak self-assigned this Feb 14, 2025
@zozlak
Copy link
Member Author

zozlak commented Feb 14, 2025

Actually it's a very good question what should be reported in such a case...

@zozlak
Copy link
Member Author

zozlak commented Feb 24, 2025

Resolved by the 590959c

@zozlak zozlak closed this as completed Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant