(ctx context.Context, rw http.ResponseWriter, err error)
| 270 | } |
| 271 | |
| 272 | func (*codersdkErrorWriter) writeInvalidClientID(ctx context.Context, rw http.ResponseWriter, err error) { |
| 273 | httpapi.Write(ctx, rw, http.StatusUnauthorized, codersdk.Response{ |
| 274 | Message: "Invalid OAuth2 client ID.", |
| 275 | Detail: err.Error(), |
| 276 | }) |
| 277 | } |
| 278 | |
| 279 | func (*codersdkErrorWriter) writeClientNotFound(ctx context.Context, rw http.ResponseWriter) { |
| 280 | // Management API endpoints return 404 for missing OAuth2 apps (proper REST semantics). |