feature: add bank account exceptions
This commit is contained in:
@@ -26,7 +26,6 @@ public class BankAccountController {
|
||||
@GetMapping("{aggregateId}")
|
||||
public ResponseEntity<BankAccountResponseDTO> getBankAccount(@PathVariable String aggregateId) {
|
||||
final var query = new GetBankAccountByIDQuery(aggregateId);
|
||||
log.info("GET bank account query: {}", query);
|
||||
final var result = queryService.handle(query);
|
||||
log.info("GET bank account result: {}", result);
|
||||
return ResponseEntity.ok(result);
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.eventsourcing.bankAccount.exceptions;
|
||||
|
||||
public class InvalidAddressException extends RuntimeException {
|
||||
public InvalidAddressException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public InvalidAddressException(String address) {
|
||||
super("invalid address: " + address);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.eventsourcing.bankAccount.exceptions;
|
||||
|
||||
public class InvalidEmailException extends RuntimeException {
|
||||
public InvalidEmailException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public InvalidEmailException(String email) {
|
||||
super("invalid email address: " + email);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user