;;;; http-client-conditions.memo.scm -*- Scheme -*- ;;;; Kon Lovett, Jan '23 (module (http-client-conditions memo) (;export get) (import scheme (chicken base) condition-utils) ;;; HTTP-Client Egg Conditions (define (get sym) (case sym ;from intraweb ((http-condition?) (make-condition-predicate exn http)) ; ((client-error-condition?) (make-condition-predicate exn http client-error)) ((client-error-response) (make-condition-property-accessor client-error response)) ((client-error-body) (make-condition-property-accessor client-error body)) ; ((server-error-condition?) (make-condition-predicate exn http server-error)) ((server-error-response) (make-condition-property-accessor server-error response)) ((server-error-body) (make-condition-property-accessor server-error body)) ; ((unexpected-server-response-condition?) (make-condition-predicate exn http unexpected-server-response)) ((unexpected-server-response-response) (make-condition-property-accessor unexpected-server-response response)) ((unexpected-server-response-body) (make-condition-property-accessor unexpected-server-response body)) ; ((redirect-depth-exceeded-condition?) (make-condition-predicate exn http redirect-depth-exceeded)) ((redirect-depth-exceeded-uri) (make-condition-property-accessor server-error uri)) ; ((formdata-error-condition?) (make-condition-predicate exn http formdata-error)) ; ((unsupported-uri-scheme-condition?) (make-condition-predicate exn http unsupported-uri-scheme)) ((unsupported-uri-scheme-uri-scheme) (make-condition-property-accessor server-error uri-scheme)) ((unsupported-uri-scheme-request-uri) (make-condition-property-accessor server-error request-uri)) ; ((unknown-authtype-condition?) (make-condition-predicate exn http unknown-authtype)) ((unknown-authtype-authtype) (make-condition-property-accessor server-error authtype)) ; (else (error 'get "undefined http-client-conditions item" sym)) ) ) ) ;(http-client-conditions memo)