function parseWebsocketMessage(message) {
  try {
    const parsedPayload = JSON.parse(message);
    return parsedPayload;
  } catch (e) {
    throw new Error('Unable to parse websocket message');
  }
}
@description Parse a websocket message.
@param {string} message - Websocket message.
@returns {object} Return a websocket message object.
@example
parseWebsocketMessage('{}');