Modified _getHeaderErrorFrame to allow for an optional message.