Skip to content

Error handling of legacy Solid storage providers instead of the default cross-fetch error #11

Description

@Maximvdw

When a discovery is started on a legacy Solid server such as solidweb.org, there is no describedby link. I would expect a null response for a service in this case.

However, it still tries to extract the link and executes a fetch on this presumably non existant link (https://github.com/o-development/solid-notification-client/blob/main/packages/discovery/src/client.ts#L54) which results in a vague error:

    TypeError: Only absolute URLs are supported
      at getNodeRequestOptions (node_modules\cross-fetch\node_modules\node-fetch\lib\index.js:1327:9)
      at D:\Data\workspace\@openhps\solid\node_modules\cross-fetch\node_modules\node-fetch\lib\index.js:1450:19
      at new Promise (<anonymous>)
      at DiscoveryClient.fetch (node_modules\cross-fetch\node_modules\node-fetch\lib\index.js:1447:9)
      at DiscoveryClient.fetch [as authnFetch] (node_modules\cross-fetch\dist\node-ponyfill.js:10:20)
      at DiscoveryClient.fetchResource (node_modules\@solid-notifications\discovery\src\client.ts:38:33)
      at DiscoveryClient.fetchStorageDescription (node_modules\@solid-notifications\discovery\src\client.ts:59:17)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async DiscoveryClient.findService (node_modules\@solid-notifications\discovery\src\client.ts:22:32)
      at async Promise.all (index 0)

Example URL (public): https://maximvdw.solidweb.org/properties/position.ttl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions