Skip to content

Commit

Permalink
Add self hosting explainer to ResponseParseError
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinez committed Dec 5, 2024
1 parent 5e8e716 commit bf78db5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions http-client/lib/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>radicle-explorer</code> ${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 <code>radicle-explorer</code> (${explorerRequiredApiVersion}), but <code>radicle-explorer</code> isn't able to parse the response.`;
}
this.apiVersion = apiVersion;
this.description =
"The response received from the seed does not match the expected schema.<br/>".concat(
description,
config.deploymentId
? ""
: "<br/>If you are self-hosting <code>radicle-explorer</code> and run into this error, try to clear the browser's <code>localStorage</code> and the cache.",
);

this.method = method;
Expand Down

0 comments on commit bf78db5

Please sign in to comment.