Closed uniqueg closed 2 months ago
This pull request introduces a new custom exception AccessMethodNotDeleted
to handle cases where an attempt is made to delete the last remaining access method of an object. The changes include updates to exception handling, API documentation, and unit tests to reflect this new exception.
Files | Changes |
---|---|
drs_filer/errors/exceptions.py drs_filer/ga4gh/drs/server.py drs_filer/api/additional.data_repository_service.swagger.yaml tests/ga4gh/drs/test_server.py |
Introduced a new exception AccessMethodNotDeleted to handle cases where the last remaining access method of an object is attempted to be deleted. Updated the server logic, API documentation, and unit tests to reflect this new exception. |
Description
Change error response from
400
to409
and return an informative error message if the client attempts to delete the last remaining access method of an object. The OpenAPI specfication was updated accordingly.Fixes #53
Type of change
Checklist:
Summary by Sourcery
This pull request introduces a new exception
AccessMethodNotDeleted
to handle cases where the last remaining access method of an object is attempted to be deleted. TheDeleteAccessMethod
function and related tests have been updated accordingly. Additionally, the API documentation has been updated to reflect the new409
error response.AccessMethodNotDeleted
to handle cases where the last remaining access method of an object is attempted to be deleted.DeleteAccessMethod
function to raiseAccessMethodNotDeleted
instead ofBadRequest
when attempting to delete the last remaining access method.409
error response for refusing to delete the last remaining access method.AccessMethodNotDeleted
exception instead ofBadRequest
when deleting the last remaining access method.