CarnegieLearningWeb / UpGrade

Framework for adding A/B testing to education applications
https://www.upgradeplatform.org/
BSD 3-Clause "New" or "Revised" License
26 stars 14 forks source link

New relic error: `QueryFailedError: syntax error at or near ")"` #1156

Open amurphy-cl opened 12 months ago

amurphy-cl commented 12 months ago

Needs issue, I am just noticing this one, it is at api/log, this may be Mathstream? https://one.newrelic.com/nr1-core/errors-inbox/entity-inbox/NzMyNTEzfEFQTXxBUFBMSUNBVElPTnw4MzYyNzA4NTY?duration=2592000000&state=11c0019a-e151-bf74-47b0-2f156dfe9965

amurphy-cl commented 12 months ago

The above link no longer works for me fwiw

bcb37 commented 11 months ago

This is happening when Mathstream hits the /log endpoint with an empty array in metrics.attributes in the body. I hit the same endpoint on dev with a similar payload and it generated the same error. There's currently nothing keeping the client library from making the /log API call with an empty 'attributes` array

If we don't want to allow /log calls with empty data, we should probably handle that case more gracefully.

amurphy-cl commented 11 months ago

Thanks for tracking this down!

amurphy-cl commented 10 months ago

Error message should indicate "empty array" or metrics.attributes undefined, i.e. allow implementation with no metrics but not allow a metrics structure defined with missing metrics.attributes.

mswartzCL commented 10 months ago

Created a ticket for MATHstream team to identify where this /log call is happening and discuss how to remediate. TUT-2133

danoswaltCL commented 10 months ago

QA with the other validators when turned back (fix was to remedy the log validation)