Sha256: a810502a540079420e5f925e7522dfa6907eb73bbb56fa37fce6f87665bcbb8a

Contents?: true

Size: 415 Bytes

Versions: 1

Compression:

Stored size: 415 Bytes

Contents

# frozen_string_literal: true

module Mountapi
  module Error
    class Forbidden < StandardError
      def initialize(url, method)
        @url = url
        @method = method
        super(title)
      end

      def to_json_api
        {
          title: title,
          status: 403
        }
      end

      private

      def title
        "Not authorized to access this resource"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mountapi-0.11.1 lib/mountapi/error/forbidden.rb