import { standardErrorLog, standardInitialLog } from '../../../CoreHelpers/logging' import { Response, Body } from './types' export async function FunctionName( body: Body, ): Promise { try { if (!body) throw new Error('No Body') standardInitialLog(body, 'FunctionName') /* Rules: 1. Everything goes into this try catch 2. All functions are put into the helper.ts file 3. Helper function throw new Error('response') 4. All errors are caught in the catch 5. Use the PseudoCode below to help map out what needs doing. */ /* PseudoCode * * * * */ return { success: true, } // eslint-disable-next-line no-unreachable } catch (err) { standardErrorLog(body, err, 'FunctionName') return { success: false, error: 'Fatal error in FunctionName. Investigate.', message: err.message, } } }