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

Display a useful warning message and return HTTP 404 when dependency not found #81

Merged
merged 1 commit into from
Apr 22, 2019

Conversation

rpkyle
Copy link
Contributor

@rpkyle rpkyle commented Apr 9, 2019

Following on comments from @KPhans, this PR proposes to

  • present a warning message if a filename from the request$url object is not located in the package_map; this implies that the dependency requested could not be found
  • include the filename of the requested dependency in the warning
  • return HTTP 404 instead of HTTP 200

Previously, unmatched dependencies would trigger a cryptic 'package' must be of length 1 error, which was not helpful for end users or developers attempting to debug such errors.

Closes #79.

@rpkyle rpkyle self-assigned this Apr 9, 2019
@rpkyle rpkyle requested a review from alexcjohnson April 9, 2019 06:02
@rpkyle rpkyle changed the base branch from master to 0.0.7-dev April 10, 2019 01:00
Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much nicer this way! 💃

@rpkyle rpkyle merged commit ca533f2 into 0.0.7-dev Apr 22, 2019
@rpkyle rpkyle deleted the 0.0.6-issue79 branch April 22, 2019 18:59
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.

2 participants