(ctx context.Context, w http.ResponseWriter)
| 115 | } |
| 116 | |
| 117 | func (i *responsesInterceptionBase) validateRequest(ctx context.Context, w http.ResponseWriter) error { |
| 118 | if i.reqPayload.background() { |
| 119 | err := xerrors.New("background requests are currently not supported by AI Bridge") |
| 120 | i.sendCustomErr(ctx, w, http.StatusNotImplemented, err) |
| 121 | return err |
| 122 | } |
| 123 | |
| 124 | return nil |
| 125 | } |
| 126 | |
| 127 | // sendCustomErr sends custom responses.Error error to the client |
| 128 | // it should only be called before any data is sent back to the client |
no test coverage detected