Sha256: 61e4d4138f721dc39b9000894fec6eb4572c3486a445122a8687e734758c70bd

Contents?: true

Size: 242 Bytes

Versions: 4

Compression:

Stored size: 242 Bytes

Contents

# frozen_string_literal: true

module DeepL
  module Exceptions
    class NotFound < RequestError
      def message
        JSON.parse(response.body)['message']
      rescue JSON::ParserError
        response.body
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
deepl-rb-2.5.3 lib/deepl/exceptions/not_found.rb
deepl-rb-2.5.2 lib/deepl/exceptions/not_found.rb
deepl-rb-2.5.1 lib/deepl/exceptions/not_found.rb
deepl-rb-2.5.0 lib/deepl/exceptions/not_found.rb