Added ability to configure a custom 'no such endpoint' error funciton.