1
0
Fork 0

Simplify error response function, no need for customization

This commit is contained in:
Bram Schoenmakers 2024-04-10 07:25:44 +02:00
parent 380c63a0c3
commit 42061aae3a
Signed by: bram
GPG key ID: 0CCD19DFDC63258F

View file

@ -52,12 +52,12 @@ TEXT is the output text, optionally with a list of REFERENCES."
(when references
(list (cons "references" references))))))))
(defun kagi-test--error-output (&optional msg)
"Construct a fictitious erroneous result from the Kagi FastGPT API."
(defun kagi-test--error-output ()
"Construct a fictitious erroneous result from the Kagi API."
(json-encode
`((data . ((output . nil)))
'((data . ((output . nil)))
(error . (((code . 42)
(msg . ,(or msg "Too bad"))))))))
(msg . "Too bad")))))))
(buttercup-define-matcher-for-binary-function
:to-be-equal-including-properties equal-including-properties