Chaitanya Sreenivas
05/26/2023, 8:32 AMChaitanya Sreenivas
05/26/2023, 8:34 AMexport type LogIds = {
session_id: string,
client_id: string,
persistent_session_id: string,
client_session_id: string,
request_id: string,
};
export function auditApiHandler(logIds: LogIds): void {
if (!logIds.client_id || !logIds.client_session_id || !logIds.persistent_session_id || !logIds.request_id || !logIds.session_id ) {
throw new Error('Missing fields in the Audit Message ');
}
return;
}
Chaitanya Sreenivas
05/26/2023, 8:34 AMChaitanya Sreenivas
05/26/2023, 8:34 AMverify(synchronousBodyHandler(auditApiHandler));
- error TS2345: Argument of type '(logIds: LogIds) => void' is not assignable to parameter of type '(body: AnyJson | Buffer) => void'.
Types of parameters 'logIds' and 'body' are incompatible.
Type 'AnyJson | Buffer' is not assignable to type 'LogIds'.
Type 'null' is not assignable to type 'LogIds'.
39 .verify(synchronousBodyHandler(auditApiHandler));
Timothy Jones
05/27/2023, 6:25 AM