summaryrefslogtreecommitdiff
path: root/src/scm/webid-oidc/errors.scm
diff options
context:
space:
mode:
Diffstat (limited to 'src/scm/webid-oidc/errors.scm')
-rw-r--r--src/scm/webid-oidc/errors.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/scm/webid-oidc/errors.scm b/src/scm/webid-oidc/errors.scm
index 1476e86..beeaaea 100644
--- a/src/scm/webid-oidc/errors.scm
+++ b/src/scm/webid-oidc/errors.scm
@@ -217,6 +217,16 @@
(raise-exception
((record-constructor &unexpected-response) response cause)))
+(define-public &not-an-oidc-configuration
+ (make-exception-type
+ '&not-an-oidc-configuration
+ &external-error
+ '(value cause)))
+
+(define-public (raise-not-an-oidc-configuration value cause)
+ (raise-exception
+ ((record-constructor &not-an-oidc-configuration) value cause)))
+
(define*-public (error->str err #:key (max-depth #f))
(if (record? err)
(let* ((type (record-type-descriptor err))
@@ -309,6 +319,9 @@
(lambda (port)
(write-response (get 'response) port)))
(recurse (get 'cause))))
+ ((&not-an-oidc-configuration)
+ (format #f (G_ "the value ~s is not an OIDC configuration (because ~a)")
+ (get 'value) (recurse (get 'cause))))
((&compound-exception)
(let ((components (get 'components)))
(if (null? components)