//#region src/api/error.ts
/**
* Standard cache headers for all API responses.
*
* Cache-Control: private, no-store -- prevents CDN/proxy caching of authenticated data.
* no-store already tells caches not to store the response, so Vary is unnecessary.
*/
const API_CACHE_HEADERS = { "Cache-Control": "private, no-store" };
/**
* Create a standardized error response.
*
* Always returns `{ error: { code, message } }` with correct Content-Type.
* Use this for all error responses in API routes.
*/
function apiError(code, message, status) {
	return Response.json({ error: {
		code,
		message
	} }, {
		status,
		headers: API_CACHE_HEADERS
	});
}

//#endregion
export { apiError as t };
//# sourceMappingURL=error-Cxz0tQeO.mjs.map