Skip to content

Commit

Permalink
remove redundant exception
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaido91 committed Jun 27, 2018
1 parent 0be2525 commit a9baa7c
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,12 @@ private[v1] class ForbiddenException(msg: String) extends WebApplicationExceptio
UIUtils.buildErrorResponse(Response.Status.FORBIDDEN, msg))

private[v1] class NotFoundException(msg: String) extends WebApplicationException(
new NoSuchElementException(msg),
UIUtils.buildErrorResponse(Response.Status.NOT_FOUND, msg))

private[v1] class ServiceUnavailable(msg: String) extends WebApplicationException(
new ServiceUnavailableException(msg),
UIUtils.buildErrorResponse(Response.Status.SERVICE_UNAVAILABLE, msg))

private[v1] class BadParameterException(msg: String) extends WebApplicationException(
new IllegalArgumentException(msg),
UIUtils.buildErrorResponse(Response.Status.BAD_REQUEST, msg)) {
def this(param: String, exp: String, actual: String) = {
this(raw"""Bad value for parameter "$param". Expected a $exp, got "$actual"""")
Expand Down

0 comments on commit a9baa7c

Please sign in to comment.