Status code error from my Postman when I tested my API

I am running a backend authentication and authorization using Cognito , Api gateway and lambda.
I go this error report and was told to refer back to my cognito settings . But I dont know how to reconfigure it and fix the problem now.

{
“statusCode”: 400,
“body”: “{"error":"CustomMessage failed with error str expected, not tuple."}”
}

This I saw in resolving it.
In your Cognito User Pool, you probably have a CustomMessage Lambda trigger set up (maybe to format SMS/Email verification codes).

That Lambda must return a string, but right now it’s returning a tuple (or array-like) value.

Cognito expects something like:

event.response.smsMessage = “Your verification code is: 123456”;
event.response.emailMessage = “Your verification code is: 123456”;
event.response.emailSubject = “Verify your account”;
return event;

Can’t suggest much without seeing the code, but do you have a custom message lambda trigger? Did you code it? If so then you are probably assigning a tuple to one of the response messages instead of a string which can easily be done in non type-safe languages like NodeJS and Python.