"use strict";
/* Socket Lib - Built with rolldown */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });

//#region src/http-request/response-types.ts
/**
* Error thrown when an HTTP response has a non-2xx status code and
* `throwOnError` is enabled. Carries the full `HttpResponse` so callers can
* inspect status, headers, and body.
*/
var HttpResponseError = class HttpResponseError extends Error {
	response;
	constructor(response, message) {
		const statusCode = response.status ?? "unknown";
		const statusMessage = response.statusText || "No status message";
		super(message ?? `HTTP ${statusCode}: ${statusMessage}`);
		this.name = "HttpResponseError";
		this.response = response;
		Error.captureStackTrace(this, HttpResponseError);
	}
};

//#endregion
exports.HttpResponseError = HttpResponseError;