dev add reason entity
Test Workflow / test (push) Successful in 2s

This commit is contained in:
vladp
2026-03-27 19:35:55 +07:00
parent fdea57d947
commit 535be69840
2 changed files with 2 additions and 4 deletions
@@ -15,6 +15,7 @@ import ru.soune.nocopy.entity.payout.PayoutType;
import ru.soune.nocopy.entity.user.AuthToken;
import ru.soune.nocopy.entity.user.User;
import ru.soune.nocopy.exception.InsufficientFundsException;
import ru.soune.nocopy.exception.InvalidPayoutMethodException;
import ru.soune.nocopy.exception.NotFoundAuthToken;
import ru.soune.nocopy.exception.PendingPayoutExistsException;
import ru.soune.nocopy.repository.AuthTokenRepository;
@@ -56,7 +57,7 @@ public class PayoutController {
try {
PayoutRequest payoutRequest = payoutRequestService.createPayoutRequest(user.getId(), request);
return ResponseEntity.status(HttpStatus.CREATED).body(payoutRequest);
} catch (InsufficientFundsException | PendingPayoutExistsException e) {
} catch (InsufficientFundsException | PendingPayoutExistsException | InvalidPayoutMethodException e) {
return ResponseEntity.status(HttpStatus.CONFLICT).body(e.getMessage());
}
}