Rocky_Mountain_Vending/.pnpm-store/v10/files/ec/b252e0cd9b269b66f56bb1e6fc6dc3eef236c63ddefadd677c2dedc1b2cfbd1fe546bffcee0eeab58ed8ec9b6f4b1bf13459510ac13db88ef93d7b7ac286b6
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

21 lines
888 B
Text

import { timing } from "./timing";
export const setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => {
if (timeoutInMs) {
return timing.setTimeout(() => {
let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;
if (throwOnRequestTimeout) {
const error = Object.assign(new Error(msg), {
name: "TimeoutError",
code: "ETIMEDOUT",
});
req.destroy(error);
reject(error);
}
else {
msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;
logger?.warn?.(msg);
}
}, timeoutInMs);
}
return -1;
};