```export type LogIds = { session_id: string, ...
# pact-js
c
Copy code
export 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;
}
verify(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));
in my spec class iam getting error on synchronousbody handler
y
👋 can you show your full test code please Have you been able to get the example running out of interest (the dog example, not your own)
c
I managed to solve this error by myself thanks
🙌 1
y
Care to share your solution for others? and no problem
☝️ 1
m
The latest version of Pact JS should have that type error fixed
🙌 1