Exception: MsTeamsHermes::Message::MessageBodyTooLargeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/msteams_hermes/message.rb

Overview

Raises when the message is larger than the latest known maximum size of a microsoft teams message

Instance Method Summary collapse

Constructor Details

#initialize(current_size) ⇒ MessageBodyTooLargeError

Returns a new instance of MessageBodyTooLargeError.



16
17
18
19
20
# File 'lib/msteams_hermes/message.rb', line 16

def initialize(current_size)
  super "Microsoft Teams Webhook answered with a 413 due to content size limitations" \
        " (last check it was about #{MSTEAMS_MESSAGE_SIZE_LIMIT} bytes)." \
        "\nYour message results in a size of about #{current_size} bytes which is too much."
end