code: private function messageInMessage(string $message): string
      {
          $decodedMessage = json_decode($message, true);
          if (
              is_array($decodedMessage) &&
              isset($decodedMessage['message']) &&
              is_string($decodedMessage['message'])
          ) {
              return $decodedMessage['message'];
          }
  
          return $message;
      }
docs: Find message.
  
  @param string $message
  
  @return string