Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Setting the reason in the responsestatus overwrites the custom messag…
Browse files Browse the repository at this point in the history
…e in the exception. Removing it.
  • Loading branch information
nustiueudinastea committed Jan 20, 2017
1 parent 4757c9f commit 8162b2f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ private float calculateTotal(List<Item> items) {
return amount;
}

@ResponseStatus(value = HttpStatus.NOT_ACCEPTABLE, reason = "Payment declined")
@ResponseStatus(value = HttpStatus.NOT_ACCEPTABLE)
public class PaymentDeclinedException extends IllegalStateException {
public PaymentDeclinedException(String s) {
super(s);
}
}

@ResponseStatus(value = HttpStatus.NOT_ACCEPTABLE, reason = "Invalid order request. Order requires customer, address, card and items.")
@ResponseStatus(value = HttpStatus.NOT_ACCEPTABLE)
public class InvalidOrderException extends IllegalStateException {
public InvalidOrderException(String s) {
super(s);
Expand Down

0 comments on commit 8162b2f

Please sign in to comment.