Hi, I've noticed when the user agent is not set, you're returning the error message as html instead of json.
Please consider returning the error message in json format.
I just wanted to make sure if it was a typo.so you are asking about the typo, or the functionality ?