From bf78db52fd26569e080e96af1aae40254834967d Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Thu, 5 Dec 2024 11:58:52 +0100 Subject: [PATCH] Add self hosting explainer to `ResponseParseError` --- http-client/lib/fetcher.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/http-client/lib/fetcher.ts b/http-client/lib/fetcher.ts index c2ff73b4d..e569f76f5 100644 --- a/http-client/lib/fetcher.ts +++ b/http-client/lib/fetcher.ts @@ -62,14 +62,17 @@ export class ResponseParseError extends Error { let description: string; if (!satisfies(nodeApiVersion, explorerRequiredApiVersion)) { - description = `The node you are fetching from (v${nodeApiVersion}) doesn't match the version requirements of the web client ${explorerRequiredApiVersion}.`; + description = `The node you are fetching from (v${nodeApiVersion}) doesn't match the version requirements of radicle-explorer ${explorerRequiredApiVersion}.`; } else { - description = `The node (v${nodeApiVersion}) matches the version requirement of the web client (${explorerRequiredApiVersion}), but the web client isn't able to parse the response.`; + description = `The node (v${nodeApiVersion}) matches the version requirement of radicle-explorer (${explorerRequiredApiVersion}), but radicle-explorer isn't able to parse the response.`; } this.apiVersion = apiVersion; this.description = "The response received from the seed does not match the expected schema.
".concat( description, + config.deploymentId + ? "" + : "
If you are self-hosting radicle-explorer and run into this error, try to clear the browser's localStorage and the cache.", ); this.method = method;