Class in @minecraft/server-net
Extends Error
Basalt’s own: what a request that got no answer rejects with.
import { HttpError } from '@minecraft/server-net';Example
Section titled “Example”import { HttpError } from '@minecraft/server-net';
try { // Call the API here.} catch (error) { if (error instanceof HttpError) { console.warn(`${error.name}: ${error.message}`); } else { throw error; }}import { HttpError } from '@minecraft/server-net';
try { // Call the API here.}catch (error) { if (error instanceof HttpError) { console.warn(`${error.name}: ${error.message}`); } else { throw error; }}Properties
Section titled “Properties”read-only
readonly name: "HttpError";reason
Section titled “reason”read-only
readonly reason: HttpErrorReason;Types
read-only
readonly uri: string;The request’s URI.