diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2021-08-07 22:45:06 +0200 |
---|---|---|
committer | Vivien Kraus <vivien@planete-kraus.eu> | 2021-08-13 01:06:38 +0200 |
commit | db55d55e5c36c940986f437d26da1ff3c601c3b4 (patch) | |
tree | 0ecec5b2bd0b0bc6a02981a7c3b9ccafbb891c3b /src/scm/webid-oidc/errors.scm | |
parent | 0b5d0622e11c1f919ce660893067d3121e2583a0 (diff) |
Make a better client API
Diffstat (limited to 'src/scm/webid-oidc/errors.scm')
-rw-r--r-- | src/scm/webid-oidc/errors.scm | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/scm/webid-oidc/errors.scm b/src/scm/webid-oidc/errors.scm index beccc35..1c7d539 100644 --- a/src/scm/webid-oidc/errors.scm +++ b/src/scm/webid-oidc/errors.scm @@ -1,4 +1,4 @@ -;; webid-oidc, implementation of the Solid specification +;; disfluid, implementation of the Solid specification ;; Copyright (C) 2020, 2021 Vivien Kraus ;; This program is free software: you can redistribute it and/or modify @@ -21,7 +21,8 @@ #:use-module (ice-9 i18n) #:use-module (srfi srfi-19) #:use-module (web uri) - #:use-module (web response)) + #:use-module (web response) + #:use-module (web client)) (define (G_ text) (let ((out (gettext text))) @@ -883,16 +884,6 @@ ((record-constructor &neither-identity-provider-nor-webid) uri why-not-identity-provider why-not-webid))) -(define-public &token-request-failed - (make-exception-type - '&token-request-failed - &external-error - '(cause))) - -(define-public (raise-token-request-failed cause) - (raise-exception - ((record-constructor &token-request-failed) cause))) - (define-public &profile-not-found (make-exception-type '&profile-not-found @@ -1420,9 +1411,6 @@ (uri->string (get 'uri)) (recurse (get 'why-not-identity-provider)) (recurse (get 'why-not-webid)))) - ((&token-request-failed) - (format #f (G_ "the token request failed (because ~a)") - (recurse (get 'cause)))) ((&profile-not-found) (format #f (G_ "you don’t have a refresh token for identity ~a certified by ~a in ~s") (uri->string (get 'webid)) @@ -1529,6 +1517,6 @@ ((&error) (format #f (G_ "there is an error"))) (else - (error (format #f (G_ "Unhandled exception type ~a.") - (record-type-name type)))))) + (format #f (G_ "there is an unknown exception of kind ~s") + (record-type-name type))))) (format #f "~a" err))) |