Make method signature of ONERROR identical to route handlers