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
Possibly unhandled rejection: {"data":{"status":"500","error":"Internal Server Error"},"status":500,"config":{"method":"PUT","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"/api/cases/3934/queries/95681/ratings/FW393001","data":{"rating":1},"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/json;charset=utf-8","X-CSRF-TOKEN":"FAPyFvA3KITzOAhjx4k1WpcXTOtnznJ5xKk9NHSXN0v8AszKDwmHdGB+FOQMiS9rX1dDNx1pdigUEOMjTGqE1g==","X-Requested-With":"XMLHttpRequest"}},"statusText":"Internal Server Error","xhrStatus":"complete"}
What I've discovered is that our logic to detect if a "docid" is base64 encoded or not turns out to work in all cases. For example, this doc id: SHFGS700 is considered base 64 encoded value!
@controller.id_base64? "SHFGS700"
The reason we do base64 encoding is because our routing logic looks like:
PUT http://app.quepid.com/api/cases/3934/queries/95681/ratings/SHFGS700 with a payload of
{"rating":"2"}
So, if the doc id has a . or a / in it, then we have issues, so we base64 encode.
However, what if we do this:
PUT http://app.quepid.com/api/cases/3934/queries/95681/ratings with a payload of
{
{"doc_id":"SHFGS700", "rating":"2"}
}
Then we don't care if there is a . or a / in the name of the doc!
Describe the bug
Appears that what we think an "id" is can blow up. http://app.quepid.com/api/cases/3934/queries/95681/ratings/FW393001
Possibly unhandled rejection: {"data":{"status":"500","error":"Internal Server Error"},"status":500,"config":{"method":"PUT","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"/api/cases/3934/queries/95681/ratings/FW393001","data":{"rating":1},"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/json;charset=utf-8","X-CSRF-TOKEN":"FAPyFvA3KITzOAhjx4k1WpcXTOtnznJ5xKk9NHSXN0v8AszKDwmHdGB+FOQMiS9rX1dDNx1pdigUEOMjTGqE1g==","X-Requested-With":"XMLHttpRequest"}},"statusText":"Internal Server Error","xhrStatus":"complete"}
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should rate!
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: