Closed tloubrieu-jpl closed 2 years ago
@tloubrieu-jpl for the first item "There should not be a success message, I am guessing only the error coming from the dois POST request are catch, we should catch error coming from the submit action as well."
For reserve there is a format for errors:
{
"errors": [
{
"message": "There is already a DOI 10.13143/wj8z-df73 associated with PDS identifier urn:nasa:pds:insight_cameras::11.0 (status=review).\nYou cannot modify a DOI for an existing PDS identifier.",
"name": "CriticalDOIException"
}
]
}
For submit review there is no mention of error except for the status 400.
{
"detail": "Missing query parameter 'identifier'",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}
Since it doesn't come as an error array it is not detect as an error. The only way to know would be to check the status number. Should I make it check for different status numbers or can you return an errors array as when reserving?
@eddiesarevalo you are right, we don't need to develop something for this type of errors since it will not happen once the identifier parameter will not have the typo.
Lets forget about capturing the submit
errors for now.
๐ Describe the bug
When we submit an updated DOI in the release form, there is a typo in the API request parameter
identifier
.identifer
is used instead.๐ To Reproduce
Steps to reproduce the behavior:
http://localhost:8080/PDS_APIs/pds_doi_api/0.2/doi/submit?identifer=urn:nasa:pds:insight_cameras::5.0&force=true
๐ต๏ธ Expected behavior
identifier
instead ofidentifer
๐ Version of Software Used
Latest version of the UI on main branch, with latest version of the API (deployed on pds-dev3)
๐ฉบ Test Data / Additional context
๐Screenshots
๐ฅ System Info
๐ฆ Related requirements
โ๏ธ Engineering Details