Prototype router with custom request type and returned error