Class OpenAiResponsesException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.ai.openai.responses.OpenAiResponsesException
All Implemented Interfaces:
Serializable

public class OpenAiResponsesException extends RuntimeException
Thrown when the Responses API reports a failed response, or emits an error event mid-stream. Unlike a transport failure, this means the request reached the model and the model run itself did not complete.
Since:
2.1.0
Author:
Dimitar Proynov
See Also:
  • Constructor Details

    • OpenAiResponsesException

      public OpenAiResponsesException(@Nullable String code, String message)
  • Method Details

    • getCode

      public @Nullable String getCode()
      Return the OpenAI error code, or null if the error carried none.