SciCatProject / SciCatProject/backend
Verbosity on failing dataset ingestion
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 27
- Forks
- 37
- Avg merge
- 17h 32m
- Merged PRs (30d)
- 38
Description
Verbosity of failing dataset ingestion
When testing the new backend we ( @linupi and @AnastasiiaSereda ) saw that there are some minor changes in the requiered entries in what is requested by POST api/v3/datasets . If dataset ingestion fails on a missing required or wrongly formatted field the new backend replies simply with STATUS 500 internal server errror. Here is an example in Postman with missing principalInvestigator:

However, looking at the backend process there is useful information that could be redirected into the response of the failing request in some way. Here is an example:

So instead of just receiving an internal server errror it would be nice to actually get the message that the principalInvestigator was missing in the request and that this is the reason why it could not be processed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure described for POST api/v3/datasets using the missing principalInvestigator example in Postman, then trace the backend process that handles dataset ingestion and validation. The fix is complete when missing or wrongly formatted required fields produce a response identifying the validation problem instead of a generic 500 internal server error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100