cisagov / manage.get.gov

A Django-based domain name registrar that interfaces with an EPP registry
https://get.gov
Other
60 stars 19 forks source link

Apostrophes in JSON blob returns "\u2019" #1549

Open therealslimhsiehdy opened 11 months ago

therealslimhsiehdy commented 11 months ago

Current Behavior

When invoking the availability API (ie http://localhost:8080/api/v1/available/?domain=hello), the error message for unable to contact registry returns:

{"available": false, "code": "error", "message": "We\u2019re experiencing a system connection error. Please wait a few minutes and try again. If you continue to receive this error after a few tries, contact help@get.gov."}

Please note that this is only when you call the API and get the json blob, it parses unicode correctly for the front end.

Expected Behavior

We\u2019re is incorrect, and is supposed to be We're, see below for full correct message:

We’re experiencing a system connection error. Please wait a few minutes
and try again. If you continue to receive this error after a few tries,
contact help@get.gov.

You can find this error in errors.py.

Steps to Reproduce

Invoke the availability API locally to trigger the CANNOT CONTACT REGISTRY error -- ie http://localhost:8080/api/v1/available/?domain=hello

Environment

No response

Additional Context

No response

Issue Links

No response

PaulKuykendall commented 3 months ago

@therealslimhsiehdy - can we just change this in errors.py to use the regular straight-up apostrophe instead of the rich-text slanty one?? And if this is obsolete, please close as not planned.