function checkForError(node) {
            const scope = context.getScope()
            const parameters = getParameters(scope)
            const firstParameter = parameters[0]

            if (
                firstParameter &&
                matchesConfiguredErrorName(firstParameter.name)
            ) {
                if (firstParameter.references.length === 0) {
                    context.report({ node, messageId: "expected" })
                }
            }
        }
Check to see if we're handling the error object properly.
@param {ASTNode} node The AST node to check.
@returns {void}