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

Make "No such file or directory" errors more descriptive #237

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thislooksfun
Copy link
Contributor

Previously, "No such file or directory" errors would point to this line in this file, i.e.
fileError(2, "No such file or directory /Users/[redacted]/Desktop/Programming/Swift/Perfect/[redacted]/Core/.build/checkouts/PerfectLib.git-3712999737848873669/Sources/PerfectLib/File.swift open(_:permissions:) 245")
This change will replace that error with:
fileError(2, "No such file or directory /Users/[redacted]/Desktop/Programming/Swift/Perfect/[redacted]/log/log.log open(_:permissions:) 244")

Previously, "No such file or directory" errors would point to this line in this file, i.e.
`fileError(2, "No such file or directory /Users/[redacted]/Desktop/Programming/Swift/Perfect/[redacted]/Core/.build/checkouts/PerfectLib.git-3712999737848873669/Sources/PerfectLib/File.swift open(_:permissions:) 245")`
This change will replace that error with:
`fileError(2, "No such file or directory /Users/[redacted]/Desktop/Programming/Swift/Perfect/[redacted]/log/log.log open(_:permissions:) 244")`
@kjessup
Copy link
Member

kjessup commented Jul 8, 2017

I want to make sure that http server doesn't barf out potentially sensitive information by default. I know that error message needs to be fixed (as you did) but I want to make sure the implications are dealt with first.

@thislooksfun
Copy link
Contributor Author

thislooksfun commented Jul 8, 2017

That makes perfect (heh) sense. I didn't think of that since I'm planning on having custom error pages anyway.
Maybe have an option (default: off) to send the missing file error with the default 404 page?
(mirroring Slack w/ this)

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

Successfully merging this pull request may close these issues.

None yet

2 participants