Reject traffic without logging exceptions
This commit is contained in:
parent
b64b27e5ea
commit
b100b3c36b
|
@ -110,13 +110,14 @@ public class MessageController {
|
||||||
@PUT
|
@PUT
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public SendMessageResponse sendMessage(@Auth Optional<Account> source,
|
public Response sendMessage(@Auth Optional<Account> source,
|
||||||
@HeaderParam(OptionalAccess.UNIDENTIFIED) Optional<Anonymous> accessKey,
|
@HeaderParam(OptionalAccess.UNIDENTIFIED) Optional<Anonymous> accessKey,
|
||||||
@HeaderParam("User-Agent") String userAgent,
|
@HeaderParam("User-Agent") String userAgent,
|
||||||
@PathParam("destination") AmbiguousIdentifier destinationName,
|
@PathParam("destination") AmbiguousIdentifier destinationName,
|
||||||
@Valid IncomingMessageList messages)
|
@Valid IncomingMessageList messages)
|
||||||
throws RateLimitExceededException
|
throws RateLimitExceededException
|
||||||
{
|
{
|
||||||
|
return Response.status(503).build();
|
||||||
/* if (!source.isPresent() && !accessKey.isPresent()) {
|
/* if (!source.isPresent() && !accessKey.isPresent()) {
|
||||||
throw new WebApplicationException(Response.Status.UNAUTHORIZED);
|
throw new WebApplicationException(Response.Status.UNAUTHORIZED);
|
||||||
}
|
}
|
||||||
|
@ -187,8 +188,6 @@ public class MessageController {
|
||||||
.entity(new StaleDevices(e.getStaleDevices()))
|
.entity(new StaleDevices(e.getStaleDevices()))
|
||||||
.build());
|
.build());
|
||||||
} */
|
} */
|
||||||
|
|
||||||
throw new WebApplicationException(Response.status(503).build());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Timed
|
@Timed
|
||||||
|
|
Loading…
Reference in New Issue