Skip to content

Commit

Permalink
ASPL-532
Browse files Browse the repository at this point in the history
Better message to be conveyed in Jenkins console when traffic file > 200Mb is uploaded
  • Loading branch information
vishalhcl-5960 committed Oct 12, 2023
1 parent c952f60 commit 02845bc
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,14 @@ private Boolean updateTrafficJob(File file, String jobId, String action) {
HttpResponse response = client.postMultipart(request_url, request_headers, parts);
int status = response.getResponseCode();
if (status != HttpsURLConnection.HTTP_OK) {
return false;
JSONObject json = (JSONObject) response.getResponseBodyAsJSON();
if(json != null && json.has("errorMessage")){
String errorResponse = json.getString("errorMessage");
m_progress.setStatus(new Message(Message.ERROR, errorResponse));
}
return false;
}
} catch(IOException e) {
} catch(IOException | JSONException e) {
m_progress.setStatus(new Message(Message.ERROR, Messages.getMessage(ERROR_UPDATE_JOB, e.getLocalizedMessage())));
return false;
}
Expand Down

0 comments on commit 02845bc

Please sign in to comment.