victor0402/rest-api-client

View on GitHub
lib/rest/api/exceptions/unauthorized_exception.rb

Summary

Maintainability
A
0 mins
Test Coverage
module RestApiClient
  class UnauthorizedException < StandardError

    attr_accessor :errors

    def initialize(errors)
      super 'You are not allowed to perform this action. Maybe you forgot to pass the authorization token?'
      @errors = (errors && errors.is_a?(Array)) ? errors.uniq : errors
    end
  end
end