It seems likely that if someone pushes HTML (or XML) instead of JSON to Phoenix, the backend or UI will attempt to parse it as JSON, resulting in errors like "Unexpected token '<', ... is not valid JSON" and causing the application to crash or display error screens. Phoenix does not currently sanitize or validate incoming trace payloads to ensure they are JSON before storage or processing, so invalid formats can break search and visualization features. See <https://github.com/Arize-ai/phoenix/issues/9208|this issue> and <https://github.com/Arize-ai/phoenix/issues/4091|this one> for examples.
To prevent this, you should validate all data as JSON before sending it to Phoenix. If you control the ingestion pipeline, add a check to reject or log any non-JSON payloads before they reach Phoenix. There is no built-in Phoenix-side setting to automatically reject non-JSON traces as of now.
Would you like more detail on how to implement such validation in your pipeline?
Sources:
- <https://github.com/Arize-ai/phoenix/issues/9208|this issue>
- <https://github.com/Arize-ai/phoenix/issues/4091|this one>