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_codeString?

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



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

def reason_code = problem&.reason_code

#securityHash

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

Returns:

  • (Hash)

    reason-dependent payload, e.g. requiredAnyOfPermissions



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

def security = problem&.security || {}