Skip to content

Commit bffc2be

Browse files
fix(ContactAPI): Allow contact email to be sent when there is an issue parsing userAgent
1 parent 2cb07de commit bffc2be

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/org/wise/portal/presentation/web/controllers/contact/ContactAPIController.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,8 @@ private String getContactEmailBody(String name, String email, String teacherUser
169169
addProjectAndRunDetailsToBody(body, runId, projectId);
170170
try {
171171
addUserSystemDetailsToBody(body, userAgent);
172-
} catch (IOException e) {
173-
e.printStackTrace();
174-
} catch (JSONException e) {
172+
} catch (Exception e) {
173+
// it's ok to not have user agent details. Allow the email to be sent.
175174
e.printStackTrace();
176175
}
177176
return body.toString();

0 commit comments

Comments
 (0)