ant0ine / go-json-rest

A quick and easy way to setup a RESTful JSON API
https://ant0ine.github.io/go-json-rest/
MIT License
3.51k stars 381 forks source link

Custom 404 #193

Open mhemmings opened 8 years ago

mhemmings commented 8 years ago

The default 404 message from rest.MakeRouter is not customisable.

Yes, writing a custom error handler in general is trivial, however I can't seem to find a way to override this default behaviour for requests that don't match a route.

mhemmings commented 8 years ago

Same thing for method not allowed. There should be a way to define a custom error response format for all internal errors and any response from rest.Error