chadtmiller.com/pds.js
An atproto PDS in JavaScript, for Cloudflare Workers and Node
0
0
/**
* What a refused XRPC call throws, on its own so that naming it costs a
* caller nothing else.
*
* The client the repository browser runs on needs this class and nothing
* around it. Reaching it through xrpc.js pulls the session client in, and
* that reaches the OAuth helper, which opens a node:http server to catch the
* redirect. A bundler drops the unreached code; a dev server evaluates the
* module and the page fails on the import.
*/
export class XrpcError extends Error {
/**
* @param {number} status
* @param {string} error
* @param {string} message
*/
constructor(status, error, message) {
super(message);
this.status = status;
this.error = error;
}
}