CDLUC3 / CDLUC3/mrt-replic

DELETE /invdelete on primary node should probably throw REQUEST_INVALID instead of INVALID_OR_MISSING_PARM

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

The deleteObjectNode() method on ReplicationServiceHandler throws TException.INVALID_OR_MISSING_PARM if given a primary storage node, which translates to a 500 Internal Server Error.

Since this is a client (caller) error, rather than a problem with the server state, it would probably be more appropriate to return a 400 Bad Request by throwing TException.REQUEST_INVALID.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in replication-src/src/main/java/org/cdlib/mrt/replic/basic/service/ReplicationServiceHandler.java at deleteObjectNode(), which currently throws INVALID_OR_MISSING_PARM for a primary storage node. Verify the endpoint’s exception-to-HTTP mapping, then ensure this client error results in TException.REQUEST_INVALID and a 400 Bad Request response.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.