@dylanh724 wrote:
( Spinned off originally from here for suggestions to provide friendlier API errors : Improve (add) friendly JSON API error messages (at least generic ones) )
Creating a generic new topic:
In “raw”, imagine there being a ¢ or ( ͡° ͜ʖ ͡°) or something with unicode. Attempting to use the API to create a new topic will result in a plain jane 500 err with no extra info –
{"headers":{"Server":"nginx","X-Request-Id":"blah-blah-blah-request-id123","X-Runtime":"0.155158","Connection":"close","Content-Length":"0","Date":"Sat, 07 Oct 2017 14:43:30 GMT","Content-Type":"text/html; charset=utf-8"},"responseXml":null,"responseJson":null,"cookies":[],"responseCode":500,"responseString":""}
Removing the unicode does the trick. The coin above
¢
can be used to test it. Simply adding it gets 500, removing it gets 200.Nasty little bug ~ this breaks our reporting system, as chat logs often contain unicode. Surely there’s a multitude of other uses for unicode (not just for lenny faces, but for localization)
*It’s important to note that SOME unicode works, such as full-width commas (they are converted to regular-width commas).
Posts: 9
Participants: 2