Skip to content

Commit ad0fc32

Browse files
committed
fix: return 400 error if aggregation query is invalid
1 parent 498b306 commit ad0fc32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/handlers/transactions_handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func handleTransactionsRequest(c *gin.Context) {
158158
if err != nil {
159159
log.Error().Err(err).Msg("Error querying aggregates")
160160
// TODO: might want to choose BadRequestError if it's due to not-allowed functions
161-
api.InternalErrorHandler(c)
161+
api.BadRequestErrorHandler(c, err)
162162
return
163163
}
164164
queryResult.Aggregations = aggregatesResult.Aggregates

0 commit comments

Comments
 (0)