CarnegieLearningWeb / UpGrade

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

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

Open amurphy-cl opened 8 months ago

amurphy-cl commented 8 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 8 months ago

The above link no longer works for me fwiw

bcb37 commented 8 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 8 months ago

Thanks for tracking this down!

amurphy-cl commented 7 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 7 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 7 months ago

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