Skip to content

Commit 774c632

Browse files
fix(Contact): Allow contact email to be sent when there is an issue parsing userAgent (#312)
1 parent 2cb07de commit 774c632

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

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)