avoid exposing the smtp host/port when an email could not be sent

This commit is contained in:
Athou
2022-08-07 22:11:12 +02:00
parent c0bd7d0610
commit d34c0c8652

View File

@@ -276,10 +276,7 @@ public class UserREST {
return Response.ok().build();
} catch (Exception e) {
log.error(e.getMessage(), e);
return Response.status(Status.INTERNAL_SERVER_ERROR)
.entity("could not send email: " + e.getMessage())
.type(MediaType.TEXT_PLAIN)
.build();
return Response.status(Status.INTERNAL_SERVER_ERROR).entity("could not send email").type(MediaType.TEXT_PLAIN).build();
}
}