openfoodfacts-server icon indicating copy to clipboard operation
openfoodfacts-server copied to clipboard

Error messages for the API should be JSON not HTML

Open alexgarel opened this issue 1 year ago • 0 comments

See https://github.com/openfoodfacts/openfoodfacts-server/pull/7331#discussion_r969616671

Currently if an error occurs, we return a text in html, even if we are serving an API call. This is impractical for the API to get the error message.

alexgarel avatar Sep 19 '22 08:09 alexgarel