Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use http create key endpoint #101

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented Dec 7, 2023

Switch to use http endpoint for create private key pair

This endpoint introduced in gitpod-io/gitpod#18411 which is 4 month ago, gitpod cloud and dedicated user already have this endpoint

To use this endpoint, we can be more smoothly compatible with next-gen.

@iQQBot iQQBot marked this pull request as draft December 7, 2023 11:38
import { rawWorkspaceToWorkspaceData } from '../../publicApi';

function isServiceError(obj: any): obj is ServiceError {
// eslint-disable-next-line eqeqeq
return obj != null && typeof obj === 'object' && typeof obj.metadata != null && typeof obj.code === 'number' && typeof obj.message === 'string';
}

function wrapSupervisorAPIError<T>(callback: () => Promise<T>, opts?: { maxRetries?: number; signal?: AbortSignal }): Promise<T> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still keep retry in case of network error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants