Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return HTTP 500 when failing to load the JSON configuration #2073

Open
nodiscc opened this issue Feb 11, 2024 · 0 comments
Open

Return HTTP 500 when failing to load the JSON configuration #2073

nodiscc opened this issue Feb 11, 2024 · 0 comments

Comments

@nodiscc
Copy link
Member

nodiscc commented Feb 11, 2024

Currently when the syntax of config.json.php is invalid, Shaarli returns a HTTP 200 (successful), but displays the following message.

An error occurred while parsing JSON configuration file (data/config.json.php): error code #4
➜ Syntax error
Please check your JSON syntax (without PHP comment tags) using a JSON lint tool such as jsonlint.com.

It should reply with a HTTP code 500 instead. This would make it easier to monitor the actual status of a Shaarli instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant