expose runtime exceptions over grpc api (#2088)

This commit is contained in:
woodser 2025-12-26 16:00:08 -04:00 committed by GitHub
parent 0e1113e82b
commit 51d4504ebf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 9 deletions

View file

@ -101,14 +101,6 @@ class CorePriceService {
// Offer price can be null (if price feed unavailable), thus a null-tolerant comparator is used.
Comparator<Offer> offerPriceComparator = Comparator.comparing(Offer::getPrice, Comparator.nullsLast(Comparator.naturalOrder()));
// TODO: remove this!!!
// Trading xmr-traditional is considered as buying/selling XMR, but trading xmr-crypto is
// considered as buying/selling crypto. Because of this, when viewing a xmr-crypto pair,
// the buy column is actually the sell column and vice versa. To maintain the expected
// ordering, we have to reverse the price comparator.
//boolean isCrypto = CurrencyUtil.isCryptoCurrency(currencyCode);
//if (isCrypto) offerPriceComparator = offerPriceComparator.reversed();
// Offer amounts are used for the secondary sort. They are sorted from high to low.
Comparator<Offer> offerAmountComparator = Comparator.comparing(Offer::getAmount).reversed();

View file

@ -36,7 +36,7 @@ import org.slf4j.Logger;
class GrpcExceptionHandler {
private final Predicate<Throwable> isExpectedException = (t) ->
t instanceof IllegalStateException || t instanceof IllegalArgumentException;
t instanceof IllegalStateException || t instanceof IllegalArgumentException || t instanceof RuntimeException;
@Inject
public GrpcExceptionHandler() {