athens
athens copied to clipboard
Enable custom error message for 404
Is your feature request related to a problem? Please describe. We want to enforce some deny policy at the organizational level when someone attempts to install a potentially confusing repo's URLs (per this blog post). For example:
-
github.com/siruspen/logrus
is likely a typo from the populargithub.com/sirupsen/logrus
Having the mode=none
isn't clear enough as to why the package couldn't be found. We wish to be able to customize the error message returned in this case (and probably in other cases where 404 is returned as well).
Describe the solution you'd like Would be nice if we can configure it in the mode file:
download "github.com/siruspen/logrus" {
mode = "none"
message="Did you mean to use github.com/sirupsen/logrus instead? If not, please ask for help in #some-slack-channnel"
}
Describe alternatives you've considered
Not quite sure. I'm not familiar with athens
. Maybe having some way to configure 404 templates in the proxy?
Additional context N/A