WhatsApp Flows Health Check requires base64 encoded string

My WhatsApp Flow returns this Health Check Error:

Response body is not Base64 encoded
Expected result
Base64 encoded string
Actual result
{“data”:{“status”:”active”}}

My endpoint has a file that handles the health check and data exchanges which looks like this:

console.log(decryptedBody)

 // handle health check request
  if (action === 'ping') {
    
    return {
      data: {
        status: "active", 
      }
    };
  }

   // handle initial request when opening the flow (INIT action)
   if (action === "INIT") {
    return {
      screen: "WELCOME",
      data: {
  "coverimage": "/9j...."

My log is returning action: ‘ping’

I don’t understand why it requires a base64 encoded string when the action is ping as it should be expecting {“data”:{“status”:”active”}} or am I wrong?

There’s a base64 image that gets loaded when action === ‘INIT’, but when I replace the result from the ‘ping’ function with the ‘INIT’ result then it returns another error that says:

Response body is not Base64 encoded
Expected result
Base64 encoded string
Actual result
{“screen”:”WELCOME”,”data”:{“coverimage”:”/9j/4AAQ…