Exception: Ksef::AuthorizationError

Inherits:
ApiError show all
Defined in:
lib/ksef/errors.rb

Overview

HTTP 403. Carries a structured reason (docs/REFERENCE.md §5.3) rather than just prose.

Instance Attribute Summary

Attributes inherited from Error

#problem

Instance Method Summary collapse

Methods inherited from ApiError

#code, #details, #raw, #status, #trace_id

Methods inherited from Error

#initialize

Constructor Details

This class inherits a constructor from Ksef::Error

Instance Method Details

#reason_code ⇒ String?

Returns one of missing-permissions, ip-not-allowed, insufficient-resource-access, auth-method-not-allowed, security-service-blocked, context-type-not-allowed.

Returns:

  • (String, nil) —

    one of missing-permissions, ip-not-allowed, insufficient-resource-access, auth-method-not-allowed, security-service-blocked, context-type-not-allowed



94
# File 'lib/ksef/errors.rb', line 94

def reason_code = problem&.reason_code

#security ⇒ Hash

Returns reason-dependent payload, e.g. requiredAnyOfPermissions.

Returns:

  • (Hash) —

    reason-dependent payload, e.g. requiredAnyOfPermissions



97
# File 'lib/ksef/errors.rb', line 97

def security = problem&.security || {}