zmedelis / bosquet

Tooling to build LLM applications: prompt templating and composition, agents, LLM memory, and other instruments for builders of AI applications.
https://zmedelis.github.io/bosquet/
Eclipse Public License 1.0
277 stars 18 forks source link

alternative Azure exception handling , keep ex-info #37

Closed behrica closed 1 year ago

behrica commented 1 year ago

Not sure, this is better. It keeps the exception root case in a map:


1. Unhandled clojure.lang.ExceptionInfo
   OpenAI API error
   {:execution-id #uuid "96769ec5-afdd-4dc9-93c4-de80d610ded8",
    :stage :leave,
    :interceptor :wkok.openai-clojure.sse/perform-sse-capable-request,
    :type java.net.ConnectException,
    :exception #error {
    :cause nil
    :via
    [{:type java.net.ConnectException
      :message nil
      :at [jdk.internal.net.http.HttpClientImpl send "HttpClientImpl.java" 573]}
     {:type java.net.ConnectException
      :message nil
      :at [jdk.internal.net.http.common.Utils toConnectException "Utils.java" 1047]}
     {:type java.nio.channels.UnresolvedAddressException
      :message nil
      :at [sun.nio.ch.Net checkAddress "Net.java" 149]}]
    :trace