Hi All, iam a new user to pact , iam using pact wi...
# general
c
Hi All, iam a new user to pact , iam using pact with message queues , iam trying to follow the dog example on the github
this is my handler
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;
}
in my spec class iam getting error on synchronousbody handler
Copy code
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));
t
If you update to the latest version of pact-js, this should go away
☝️ 1