Skip to content

PHP warnings/errors in WordPress API crash frontend #79

@simonrjones

Description

@simonrjones

Issue
The API was trying to json_decode() an API response, but the response had a couple of PHP warning messages at the start due to the backend having some missing media items. This caused json_decode() to fail and throw up a JSON syntax error exception (FailedRequestException). This returned an error 500.

What I'd expect
Not sure, a production site would return a Server Error 500 page which is correct. Do we want to supress these errors and ensure we can return content to a user?

/cc @sean-dunwoody @gtrinkwon

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions