(ctx context.Context, w http.ResponseWriter)
| 131 | } |
| 132 | |
| 133 | func (i *responsesInterceptionBase) validateRequest(ctx context.Context, w http.ResponseWriter) error { |
| 134 | if i.reqPayload.background() { |
| 135 | err := xerrors.New("background requests are currently not supported by AI Bridge") |
| 136 | i.sendCustomErr(ctx, w, http.StatusNotImplemented, err) |
| 137 | return err |
| 138 | } |
| 139 | |
| 140 | return nil |
| 141 | } |
| 142 | |
| 143 | // writeUpstreamError marshals and writes a given error. |
| 144 | func (i *responsesInterceptionBase) writeUpstreamError(w http.ResponseWriter, oaiErr *intercept.ResponseError) { |
no test coverage detected