Sha256: 80dcb77df3df6e5876a29cd519f5339e595e735a6fcaec81b4f36f77a9d0f959

Contents?: true

Size: 652 Bytes

Versions: 1

Compression:

Stored size: 652 Bytes

Contents

require_relative '../models/api_error'
require_relative 'api_exception'

module PCPServerSDK
  module Errors
    
    class ApiErrorResponseException < ApiException
      # The errors
      # @return [Array<PCPServerSDK::Models::APIError>]
      attr_reader :errors

      # The constructor
      # @param [Integer] status_code
      # @param [String] response_body
      # @param [Array<PCPServerSDK::Models::APIError>] errors
      def initialize(status_code, response_body, errors = [])
        super(status_code, response_body)
        @errors = errors.any? ? errors : []
      end

      def get_errors
        @errors
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pcp-server-ruby-sdk-1.0.0 lib/PCP-server-Ruby-SDK/errors/api_error_response_exception.rb