throw Error()

in src/lib/dfp/non-refreshable-line-items.ts [19:35]


			throw Error(
				'Failed to parse non-refreshable line items as an array',
			);
		}

		// Throw an error if any of the elements in the array are not numbers
		const lineItemsOrError = json.reduce<{ lineItems: number[] } | Error>(
			(accum, lineItemId) =>
				!(accum instanceof Error) && typeof lineItemId === 'number'
					? { lineItems: [...accum.lineItems, lineItemId] }
					: Error(
							'Failed to parse element in non-refreshable line item array as number',
						),
			{ lineItems: [] },
		);

		if (lineItemsOrError instanceof Error) {