You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An ActiveRecord::StatementInvalid occurred in audio_events#filter:
PG::InvalidTextRepresentation: ERROR: invalid input syntax for type numeric: "---
:from: 0 :to: " LINE 1: …time_seconds" – “audio_events"."start_time_seconds”) >= '---
^
: SELECT COUNT(*) FROM “audio_events” INNER JOIN “audio_recordings” ON “audio_recordings"."id” = “audio_events"."audio_recording_id” AND ("audio_recordings"."deleted_at" IS NULL) INNER JOIN “sites” ON “sites"."id” = “audio_recordings"."site_id” AND ("sites"."deleted_at" IS NULL) WHERE ("audio_events"."deleted_at" IS NULL) AND (EXISTS (SELECT 1 FROM “projects_sites” WHERE “sites"."id” = “projects_sites"."site_id” AND EXISTS (( SELECT 1 FROM “projects” WHERE “projects"."deleted_at” IS NULL AND “projects"."creator_id” = 234 AND “projects_sites"."project_id” = “projects"."id” UNION ALL SELECT 1 FROM “permissions” WHERE “permissions"."user_id” = 234 AND “permissions"."level” IN ('reader', ‘writer’, ‘owner’) AND “projects_sites"."project_id” = “permissions"."project_id” ))) OR EXISTS (SELECT 1 FROM “audio_events” “ae_ref” WHERE “ae_ref"."deleted_at” IS NULL AND “ae_ref"."is_reference” = ‘t’ AND “ae_ref"."id” = “audio_events"."id")) AND “audio_events"."is_reference” = ‘t’ AND (("audio_events"."end_time_seconds” – “audio_events"."start_time_seconds”) >= '--- :from: 0 :to: ') AND ("audio_events"."low_frequency_hertz" >= 1100)
lib/modules/api/response.rb:272:in `add_paging_and_sorting'
It looks like some custom SQL condition seems to be malformed, the '--- :from: 0 :to: '. That was probably drawn from the "durationSeconds"=>{"gteq"=>{"from"=>0, "to"=>nil}} block in the params - which is a malformed filter from the client.
Action item
Better validate the filter queries for this particular case
When done, file issue in client to stop malformed filter requests
The text was updated successfully, but these errors were encountered:
The request came from the reference library:
It looks like some custom SQL condition seems to be malformed, the
'--- :from: 0 :to: '
. That was probably drawn from the"durationSeconds"=>{"gteq"=>{"from"=>0, "to"=>nil}}
block in the params - which is a malformed filter from the client.Action item
The text was updated successfully, but these errors were encountered: