diff --git a/internal/handlers/transactions_handlers.go b/internal/handlers/transactions_handlers.go index a94f91c..982a055 100644 --- a/internal/handlers/transactions_handlers.go +++ b/internal/handlers/transactions_handlers.go @@ -157,8 +157,7 @@ func handleTransactionsRequest(c *gin.Context) { aggregatesResult, err := mainStorage.GetAggregations("transactions", qf) if err != nil { log.Error().Err(err).Msg("Error querying aggregates") - // TODO: might want to choose BadRequestError if it's due to not-allowed functions - api.InternalErrorHandler(c) + api.BadRequestErrorHandler(c, err) return } queryResult.Aggregations = aggregatesResult.Aggregates