The Wayback Machine - https://web.archive.org/web/20210207001229/https://github.com/slimphp/Slim/issues/2795
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

4.x - Fix message in ErrorHandler #2795

Closed
l0gicgate opened this issue Aug 12, 2019 · 4 comments
Closed

4.x - Fix message in ErrorHandler #2795

l0gicgate opened this issue Aug 12, 2019 · 4 comments
Labels

Comments

@l0gicgate
Copy link
Member

@l0gicgate l0gicgate commented Aug 12, 2019

https://github.com/slimphp/Slim/blob/4.x/Slim/Handlers/ErrorHandler.php#L271

We need to come up with a more appropriate message.

View in rendered output by enabling the "displayErrorDetails" setting.

This is confusing to me

@RyanNerd
Copy link
Contributor

@RyanNerd RyanNerd commented Aug 13, 2019

What is the purpose of appending this? (or any additional text to the error log):

View in rendered output by enabling the "displayErrorDetails" setting.

to the error_log() in the first place?

@l0gicgate This confuses me as well. What are the arguments for appending anything additional here? https://github.com/slimphp/Slim/blob/4.x/Slim/Handlers/ErrorHandler.php#L271

If there aren't any compelling arguments then I propose the line should be removed.

@l0gicgate
Copy link
Member Author

@l0gicgate l0gicgate commented Aug 13, 2019

@RyanNerd so if someone was to look at the logs and see that there are no error details (stack trace). It would indicate to them that by turning on displayErrorDetails on ErrorHandler they could see the stack trace via a browser/http client by toggling that on. It's really just a "tip"

@l0gicgate l0gicgate changed the title Fix message in ErrorHandler 4.x - Fix message in ErrorHandler Aug 19, 2019
@RyanNerd
Copy link
Contributor

@RyanNerd RyanNerd commented Aug 20, 2019

This is marked as an easy pick but changing the message to something else is very subjective. Perhaps something like:

To see error details set displayErrorDetails to true in the ErrorHandler.

QinisoM added a commit to QinisoM/Slim that referenced this issue Aug 25, 2019
This is an update to the error message as reported
QinisoM added a commit to QinisoM/Slim that referenced this issue Aug 25, 2019
Fix error message, issue slimphp#2795
QinisoM added a commit to QinisoM/Slim that referenced this issue Aug 26, 2019
Updated message as suggested
@vaga
Copy link
Contributor

@vaga vaga commented Oct 2, 2019

Perhaps, something like:
Tips: To display error details in HTTP response set "displayErrorDetails" to true in the ErrorHandler constructor.

And you can add this line only if "$displayErrorDetails" is equal to false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants