try {
        const arity = layer.length;
        if (arity === 3) {
          layer(req, obj, deserialized);
        } else {