@inrupt/solid-client
    Preparing search index...

    Function mockFetchError

    • Do not use this function in production code. For use in **unit tests**.
      

      This function initialises a new Error object with metadata as though the it was the result of getting a 404 when trying to fetch the Resource at the given URL. The mock Error can be used in unit tests that require functions that fetch Resources (like [[getSolidDataset]]) to fail.

      Parameters

      • fetchedUrl: string
      • statusCode: number = 404

        Optional status code (defaults to 404) that caused the error.

      • statusText: string = "Not Found"

      Returns FetchError

      A mock Error that represents not having been able to fetch the Resource at url due to a 404 Response.

      1.1.0