-
Notifications
You must be signed in to change notification settings - Fork 8
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
Error logging limited #112
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #112 +/- ##
=====================================
Coverage ? 5.13%
Complexity ? 91
=====================================
Files ? 129
Lines ? 6751
Branches ? 880
=====================================
Hits ? 347
Misses ? 6379
Partials ? 25
Continue to review full report at Codecov.
|
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.
Looks good, just a couple of changes.
* supplied details about the exception encountered. | ||
*/ | ||
public static String formatJSON(String message, int code, Exception e) { | ||
public static JsonNode getObjectNode(String message, int code, Exception e) { |
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.
Perhaps the return type should be ObjectNode
here.
@@ -207,12 +207,13 @@ public static boolean updateSnapshotMetadata (String jsonString) { | |||
|
|||
/** | |||
* Load a v2 JSON dump (i.e., objects with the class structure immediately before the MongoDB migration). | |||
* @param req |
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.
Remove param from javadoc if it has no description.
*/ | ||
private static boolean loadLegacy(String jsonString) { | ||
private static boolean loadLegacy(Request req) { |
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.
There may be cases in the future where it's helpful to be able to just load a JSON string directly into this loadLegacy method (rather than going through a spark request). Could you keep the bulk of this function's logic and the previous function signature intact (single String param) and maybe just wrap this within the standard (Request req, Response res)
function signature for the spark request?
The latest PR comments should be addressed and this should be ready to be merged. |
Round 1 of error logging refactor. Not as many changes as #108.