404 Exception if no endpoints are configured
dword-design opened this issue · 4 comments
Hey,
if no endpoints are configured in config.yml, a 404 Exception is thrown, stating that the request handler cannot be accessed. Reason: Not found. It would be more helpful if the programmer would be notified that no endpoints are defined (or that the config is missing). Would make the implementation more robust since it takes some time to find the error source.
Thanks in advance!
I agree it'd be nice, but it's not really high priority. If someone contributes it though I'm all for it :)
Hey,
just saw that you switch to a default endpoint if no explicit endpoint is specified by the user. Replacing that by an exception in exceptionRequest() would solve the issue but I'm not sure if this is your intended behavior? If so I could create a pull request. Do you have reasons for a default endpoint instead of a thrown error?
Oh I see, well I guess because most people just run it on localhost with default config, that usually works fine. Throwing without config will cause problems for people that use the default right now so I don't think we can really change that.
We even advertise it as the basic config https://github.com/nelmio/NelmioSolariumBundle#basic-configuration
Alright then we leave it like that! Thanks anyway.