MCPcopy Create free account
hub / github.com/coder/aibridge / validateRequest

Method validateRequest

intercept/responses/base.go:117–125  ·  view source on GitHub ↗
(ctx context.Context, w http.ResponseWriter)

Source from the content-addressed store, hash-verified

115}
116
117func (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

Callers 2

ProcessRequestMethod · 0.80
ProcessRequestMethod · 0.80

Calls 2

sendCustomErrMethod · 0.95
backgroundMethod · 0.80

Tested by

no test coverage detected