-
Notifications
You must be signed in to change notification settings - Fork 2
Error handling for bulk upload routes #63
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
base: fhir-resources-helper
Are you sure you want to change the base?
Conversation
vbothe23
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| if (invalidClinics.size() > 0) { | ||
| map.put("issues", invalidClinics); | ||
| if (map.size() > 0) { | ||
| map.put("uploadTaskStatus", "Failure"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see uploadTaskStatus here and somewhere down UploadTaskStatus. Keep it string constant.
| if (invalidUsers.size() > 0) { | ||
| map.put("issues", invalidUsers); | ||
| if (map.size() > 0) { | ||
| map.put("UploadTaskStatus", "Failure"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failure and Success can be replaced with enums
nsabale7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of small nit.
I have updated the routes for Bulk uploads to return one map object which will let us know that the operation is failure or success.