Hijack api/* to provide a better error message in case of 404

#159