# extendify/3.1.2/src/AutoLaunch/fetchers/get-launch-decisions.js

Extendify, version 3.1.2. 33 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.1.2/code/src/AutoLaunch/fetchers/get-launch-decisions.js
- Raw: https://pluginprobe.com/plugins/extendify/3.1.2/raw/src/AutoLaunch/fetchers/get-launch-decisions.js
- Modified: 2026-06-11T18:37:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/3.1.2/code/src/AutoLaunch/fetchers/get-launch-decisions.js#L10-L20`.

```javascript
import { getLaunchDecisionsShape } from '@auto-launch/fetchers/shape';
import {
	failWithFallback,
	fetchWithTimeout,
	retryTwice,
} from '@auto-launch/functions/helpers';
import { AI_HOST } from '@constants';
import { reqDataBasics } from '@shared/lib/data';

const fallback = {
	launchDecisions: { navExtras: 'none', navButtonLabel: '' },
};
const url = `${AI_HOST}/api/launch-decisions`;
const method = 'POST';
const headers = { 'Content-Type': 'application/json' };

export const handleLaunchDecisions = async ({ siteProfile }) => {
	const body = JSON.stringify({ ...reqDataBasics, siteProfile });

	const response = await retryTwice(() =>
		fetchWithTimeout(url, { method, headers, body }),
	);

	if (!response?.ok) return fallback;

	return failWithFallback(
		async () => ({
			launchDecisions: getLaunchDecisionsShape.parse(await response.json()),
		}),
		fallback,
	);
};

```
