generated from aura-ascend/template-service
add account not found exception
- update balance in AccountController with onErrorResume - update AccountService - update getForUpdateById with switchIfEmpty - update getById with switchIfEmpty - add AccountNotFoundException
This commit is contained in:
@@ -39,6 +39,6 @@ class AccountController(
|
||||
@PathVariable account: UUID,
|
||||
): Mono<Account.Response> = accountService.getById(account)
|
||||
.map { it.toResponse() }
|
||||
.switchIfEmpty(Mono.error(ResponseStatusException(NOT_FOUND)))
|
||||
.onErrorResume { Mono.error(ResponseStatusException(NOT_FOUND)) }
|
||||
.doOnError { log.debug { "account $account not found for balance" } }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user