-
Notifications
You must be signed in to change notification settings - Fork 4
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
Return API error message in UI #9
Comments
-Error messages for uploading a reserve request now show when an error is returned form the API. -If an error is returned a button that allows a retry will reset the reserve form. -Added content type json to post request.
Thanks @eddiesarevalo . Can you do something more readable by parsing the json and presenting the error type and text on one line ? |
* Provide A Way To Move Between Release And Reserve #10 -Added an app bar with buttons for the DOI UI to switch between the release and the reserve button. -Updated a small space to the top of the release and reserve pages. -Changed the name of the select component to app body. * Show API Error Message For Reserve In UI #9 -Error messages for uploading a reserve request now show when an error is returned form the API. -If an error is returned a button that allows a retry will reset the reserve form. -Added content type json to post request.
* Provide A Way To Move Between Release And Reserve #10 -Added an app bar with buttons for the DOI UI to switch between the release and the reserve button. -Updated a small space to the top of the release and reserve pages. -Changed the name of the select component to app body. * Show API Error Message For Reserve In UI #9 -Error messages for uploading a reserve request now show when an error is returned form the API. -If an error is returned a button that allows a retry will reset the reserve form. -Added content type json to post request. * Add Release Forms And Astronomy Thesaurus #2 #4 #11 -Added search for lidvid in release. -Added text field to update metadata. -Added astronomy thesaurus for metadata keywords using material ui autocomplete. -Added error message for release. -Installed material ui lab. -Added release alert to confirm or cancel release. -Added xml util for processing xml content. * Add Release Forms And Astronomy Thesaurus #2 #4 #11 -Added search for lidvid in release. -Added text field to update metadata. -Added astronomy thesaurus for metadata keywords using material ui autocomplete. -Added error message for release. -Installed material ui lab. -Added release alert to confirm or cancel release. -Added xml util for processing xml content.
-When an error is encountered on submission the form values are not deleted so that the form can be easily submitted again. -When there is an error on the upload the error message is shown in a readable format. The format is title followed by description.
* Keep Values And Show Message On Error #9 #13 -When an error is encountered on submission the form values are not deleted so that the form can be easily submitted again. -When there is an error on the upload the error message is shown in a readable format. The format is title followed by description. * Add Submitter And Node To Release #19 -Submitter and node can now be changed in release. The default value is what is returned in the doi search.
@tloubrieu-jpl Hi Thomas, how do I start the doi-service on localhost:8080? Can you point me to the instructions on doi_ui and doi_api. I tried runing npm install after cloning doi-ui but I don't have the npm package and system wouldn't let me install it either. Thanks |
@gxtchen hey Gary, from https://nasa-pds.github.io/releases/11.1/index.html, it's the pds-doi-service here: https://nasa-pds.github.io/pds-doi-service/ |
@gxtchen I also added the instructions on the pds-doi-ui README, as a prerequisite https://github.com/NASA-PDS/pds-doi-ui |
How to create a test case: send multiple time the same reserve request.
In curl:
curl --location --request POST 'http://localhost:8080/PDS_APIs/pds_doi_api/0.1/dois?action=reserve&submitter=loubrieu@jpl.nasa.gov&node=eng'
--header 'Content-Type: application/json'
--data-raw '{"labels":[{"status":"Reserved","title":"Laboratory Shocked Feldspars Bundle","publication_date":"2020-03-11","product_type_specific":"PDS4 Collection","author_last_name":"Johnson","author_first_name":"J. R.","related_resource":"urn:nasa:pds:lab_shocked_feldspars"}]}
The second time an error 400 is sent back with message:
{
"errors": [
{
"message": "The title: 'Laboratory Shocked Feldspars Bundle' has already been used for a DOI by lidvid(s):urn:nasa:pds:lab_shocked_feldspars::None, status: reserved_not_submitted, doi: ,None . You must use a different title.",
"name": "WarningDOIException"
}
]
}
The errors need to be shown in the UI.
Acceptance criteria:
When an invalidate file is submitted for reservation
Then: the error message is displayed in the UI and helps the user to correct the error
When an invalid PDS4 label is used for draft
Then the error message is displayed in the UI and helps the user to correct the error.
When an invalid OSTI record is submitted for review (ie released to Engineering Node)
Then the error message is displayed in the UI and helps the user to correct the error.
The text was updated successfully, but these errors were encountered: