diff --git a/openapi-specs/toolbox.json b/openapi-specs/toolbox.json index c85858dd9..40ab1caa8 100644 --- a/openapi-specs/toolbox.json +++ b/openapi-specs/toolbox.json @@ -5834,6 +5834,8 @@ "GIT_PUSH_REJECTED", "GIT_DIRTY_WORKTREE", "GIT_MERGE_CONFLICT", + "GIT_TRANSPORT_FAILED", + "GIT_REMOTE_REJECTED", "FILE_NOT_FOUND", "FILE_ACCESS_DENIED", "LSP_SERVER_NOT_INITIALIZED", @@ -5863,6 +5865,8 @@ "CodeGitPushRejected", "CodeGitDirtyWorktree", "CodeGitMergeConflict", + "CodeGitTransportFailed", + "CodeGitRemoteRejected", "CodeFileNotFound", "CodeFileAccessDenied", "CodeLspServerNotInitialized", diff --git a/sdk-go/pkg/errors/errors.go b/sdk-go/pkg/errors/errors.go index a329e96be..3c0479b01 100644 --- a/sdk-go/pkg/errors/errors.go +++ b/sdk-go/pkg/errors/errors.go @@ -155,6 +155,12 @@ var ( ErrGitPushRejected = &DaytonaError{Source: SourceDaemon, Code: "GIT_PUSH_REJECTED"} ErrGitDirtyWorktree = &DaytonaError{Source: SourceDaemon, Code: "GIT_DIRTY_WORKTREE"} ErrGitMergeConflict = &DaytonaError{Source: SourceDaemon, Code: "GIT_MERGE_CONFLICT"} + // ErrGitTransportFailed matches network-level git failures: DNS, TLS, + // connection, timeout. + ErrGitTransportFailed = &DaytonaError{Source: SourceDaemon, Code: "GIT_TRANSPORT_FAILED"} + // ErrGitRemoteRejected matches server-side rejections: pre-receive/update + // hooks, branch protection, size/quota limits. + ErrGitRemoteRejected = &DaytonaError{Source: SourceDaemon, Code: "GIT_REMOTE_REJECTED"} // Daemon: filesystem. ErrFileNotFound = &DaytonaError{Source: SourceDaemon, Code: "FILE_NOT_FOUND"} diff --git a/sdk-go/pkg/errors/errors_test.go b/sdk-go/pkg/errors/errors_test.go index 3d302a66e..962dfb473 100644 --- a/sdk-go/pkg/errors/errors_test.go +++ b/sdk-go/pkg/errors/errors_test.go @@ -107,6 +107,36 @@ func TestErrorsIs_DomainCodeAlsoMatchesParentStatus(t *testing.T) { } } +func TestErrorsIs_GitTransportFailedMatchesBadGateway(t *testing.T) { + body := []byte(`{"statusCode":502,"message":"dial tcp: lookup nonexistent.invalid: no such host","code":"GIT_TRANSPORT_FAILED","source":"DAYTONA_DAEMON"}`) + err := sdkerrors.NewDaytonaErrorFromBody(body, http.StatusBadGateway, nil) + + if !stderrors.Is(err, sdkerrors.ErrGitTransportFailed) { + t.Fatalf("errors.Is(err, ErrGitTransportFailed) = false") + } + if !stderrors.Is(err, sdkerrors.ErrBadGateway) { + t.Fatalf("errors.Is(err, ErrBadGateway) = false; want true (domain inherits from status)") + } + if stderrors.Is(err, sdkerrors.ErrGitRemoteRejected) { + t.Fatalf("errors.Is(err, ErrGitRemoteRejected) = true; want false (different code)") + } +} + +func TestErrorsIs_GitRemoteRejectedMatchesUnprocessableEntity(t *testing.T) { + body := []byte(`{"statusCode":422,"message":"command error on refs/heads/main: pre-receive hook declined","code":"GIT_REMOTE_REJECTED","source":"DAYTONA_DAEMON"}`) + err := sdkerrors.NewDaytonaErrorFromBody(body, http.StatusUnprocessableEntity, nil) + + if !stderrors.Is(err, sdkerrors.ErrGitRemoteRejected) { + t.Fatalf("errors.Is(err, ErrGitRemoteRejected) = false") + } + if !stderrors.Is(err, sdkerrors.ErrUnprocessableEntity) { + t.Fatalf("errors.Is(err, ErrUnprocessableEntity) = false; want true (domain inherits from status)") + } + if stderrors.Is(err, sdkerrors.ErrGitTransportFailed) { + t.Fatalf("errors.Is(err, ErrGitTransportFailed) = true; want false (different code)") + } +} + func TestErrorsIs_DomainCodesRequireBothSourceAndCode(t *testing.T) { body := []byte(`{"statusCode":404,"code":"FILE_NOT_FOUND","source":"DAYTONA_API"}`) err := sdkerrors.NewDaytonaErrorFromBody(body, http.StatusNotFound, nil) diff --git a/sdk-java/src/main/java/io/daytona/sdk/ExceptionMapper.java b/sdk-java/src/main/java/io/daytona/sdk/ExceptionMapper.java index 1341b2717..d2cf35a77 100644 --- a/sdk-java/src/main/java/io/daytona/sdk/ExceptionMapper.java +++ b/sdk-java/src/main/java/io/daytona/sdk/ExceptionMapper.java @@ -20,7 +20,9 @@ import io.daytona.sdk.exception.DaytonaGitDirtyWorktreeException; import io.daytona.sdk.exception.DaytonaGitMergeConflictException; import io.daytona.sdk.exception.DaytonaGitPushRejectedException; +import io.daytona.sdk.exception.DaytonaGitRemoteRejectedException; import io.daytona.sdk.exception.DaytonaGitRepoNotFoundException; +import io.daytona.sdk.exception.DaytonaGitTransportFailedException; import io.daytona.sdk.exception.DaytonaGoneException; import io.daytona.sdk.exception.DaytonaInternalServerException; import io.daytona.sdk.exception.DaytonaLspServerNotInitializedException; @@ -204,6 +206,8 @@ private static Map buildCodeMap() { map.put(SRC_DAEMON + "|GIT_PUSH_REJECTED", DaytonaGitPushRejectedException::new); map.put(SRC_DAEMON + "|GIT_DIRTY_WORKTREE", DaytonaGitDirtyWorktreeException::new); map.put(SRC_DAEMON + "|GIT_MERGE_CONFLICT", DaytonaGitMergeConflictException::new); + map.put(SRC_DAEMON + "|GIT_TRANSPORT_FAILED", DaytonaGitTransportFailedException::new); + map.put(SRC_DAEMON + "|GIT_REMOTE_REJECTED", DaytonaGitRemoteRejectedException::new); // Daemon: filesystem map.put(SRC_DAEMON + "|FILE_NOT_FOUND", DaytonaFileNotFoundException::new); diff --git a/sdk-java/src/main/java/io/daytona/sdk/exception/DaytonaGitRemoteRejectedException.java b/sdk-java/src/main/java/io/daytona/sdk/exception/DaytonaGitRemoteRejectedException.java new file mode 100644 index 000000000..d42f03471 --- /dev/null +++ b/sdk-java/src/main/java/io/daytona/sdk/exception/DaytonaGitRemoteRejectedException.java @@ -0,0 +1,26 @@ +// Copyright Daytona Platforms Inc. +// SPDX-License-Identifier: Apache-2.0 + +package io.daytona.sdk.exception; +/** + * The git remote rejected the operation (hooks, branch protection or quota). + * + *

Subclass of {@link DaytonaUnprocessableEntityException}. + */ +public class DaytonaGitRemoteRejectedException extends DaytonaUnprocessableEntityException { + public DaytonaGitRemoteRejectedException(String message) { + super(message); + } + + public DaytonaGitRemoteRejectedException(String message, Throwable cause) { + super(message, cause); + } + + public DaytonaGitRemoteRejectedException(String message, String code, String source) { + super(message, code, source); + } + + public DaytonaGitRemoteRejectedException(String message, Throwable cause, String code, String source) { + super(message, cause, code, source); + } +} diff --git a/sdk-java/src/main/java/io/daytona/sdk/exception/DaytonaGitTransportFailedException.java b/sdk-java/src/main/java/io/daytona/sdk/exception/DaytonaGitTransportFailedException.java new file mode 100644 index 000000000..e0ede71cc --- /dev/null +++ b/sdk-java/src/main/java/io/daytona/sdk/exception/DaytonaGitTransportFailedException.java @@ -0,0 +1,26 @@ +// Copyright Daytona Platforms Inc. +// SPDX-License-Identifier: Apache-2.0 + +package io.daytona.sdk.exception; +/** + * The git remote was unreachable (DNS, TLS, connection or timeout failure). + * + *

Subclass of {@link DaytonaBadGatewayException}. + */ +public class DaytonaGitTransportFailedException extends DaytonaBadGatewayException { + public DaytonaGitTransportFailedException(String message) { + super(message); + } + + public DaytonaGitTransportFailedException(String message, Throwable cause) { + super(message, cause); + } + + public DaytonaGitTransportFailedException(String message, String code, String source) { + super(message, code, source); + } + + public DaytonaGitTransportFailedException(String message, Throwable cause, String code, String source) { + super(message, cause, code, source); + } +} diff --git a/sdk-java/src/test/java/io/daytona/sdk/ExceptionMapperTest.java b/sdk-java/src/test/java/io/daytona/sdk/ExceptionMapperTest.java index d1b728511..df83b5a25 100644 --- a/sdk-java/src/test/java/io/daytona/sdk/ExceptionMapperTest.java +++ b/sdk-java/src/test/java/io/daytona/sdk/ExceptionMapperTest.java @@ -270,6 +270,38 @@ void domainCodeOverridesStatusCode() { }); } + @Test + void gitTransportFailedMapsToDomainClass() { + assertThatThrownBy(() -> ExceptionMapper.callMain(() -> { + throw new io.daytona.api.client.ApiException( + 502, "bad gateway", null, + "{\"message\":\"dial tcp: lookup nonexistent.invalid: no such host\",\"code\":\"GIT_TRANSPORT_FAILED\",\"source\":\"DAYTONA_DAEMON\"}"); + })) + .isInstanceOf(io.daytona.sdk.exception.DaytonaGitTransportFailedException.class) + .isInstanceOf(io.daytona.sdk.exception.DaytonaBadGatewayException.class) + .satisfies(error -> { + DaytonaException exception = (DaytonaException) error; + assertThat(exception.getCode()).isEqualTo("GIT_TRANSPORT_FAILED"); + assertThat(exception.getSource()).isEqualTo("DAYTONA_DAEMON"); + }); + } + + @Test + void gitRemoteRejectedMapsToDomainClass() { + assertThatThrownBy(() -> ExceptionMapper.callMain(() -> { + throw new io.daytona.api.client.ApiException( + 422, "unprocessable", null, + "{\"message\":\"command error on refs/heads/main: pre-receive hook declined\",\"code\":\"GIT_REMOTE_REJECTED\",\"source\":\"DAYTONA_DAEMON\"}"); + })) + .isInstanceOf(io.daytona.sdk.exception.DaytonaGitRemoteRejectedException.class) + .isInstanceOf(io.daytona.sdk.exception.DaytonaUnprocessableEntityException.class) + .satisfies(error -> { + DaytonaException exception = (DaytonaException) error; + assertThat(exception.getCode()).isEqualTo("GIT_REMOTE_REJECTED"); + assertThat(exception.getSource()).isEqualTo("DAYTONA_DAEMON"); + }); + } + @Test void unknownCodeFallsBackToStatusClass() { assertThatThrownBy(() -> ExceptionMapper.callMain(() -> { diff --git a/sdk-python/src/daytona/__init__.py b/sdk-python/src/daytona/__init__.py index 87016a444..9d042bf12 100644 --- a/sdk-python/src/daytona/__init__.py +++ b/sdk-python/src/daytona/__init__.py @@ -66,7 +66,9 @@ DaytonaGitDirtyWorktreeError, DaytonaGitMergeConflictError, DaytonaGitPushRejectedError, + DaytonaGitRemoteRejectedError, DaytonaGitRepoNotFoundError, + DaytonaGitTransportFailedError, DaytonaGoneError, DaytonaInternalServerError, DaytonaLspServerNotInitializedError, @@ -183,6 +185,8 @@ "DaytonaGitPushRejectedError", "DaytonaGitDirtyWorktreeError", "DaytonaGitMergeConflictError", + "DaytonaGitTransportFailedError", + "DaytonaGitRemoteRejectedError", "DaytonaFileNotFoundError", "DaytonaFileAccessDeniedError", "DaytonaLspServerNotInitializedError", @@ -268,6 +272,8 @@ "DaytonaGitPushRejectedError": "common.errors", "DaytonaGitDirtyWorktreeError": "common.errors", "DaytonaGitMergeConflictError": "common.errors", + "DaytonaGitTransportFailedError": "common.errors", + "DaytonaGitRemoteRejectedError": "common.errors", "DaytonaFileNotFoundError": "common.errors", "DaytonaFileAccessDeniedError": "common.errors", "DaytonaLspServerNotInitializedError": "common.errors", diff --git a/sdk-python/src/daytona/common/errors.py b/sdk-python/src/daytona/common/errors.py index df16d8e79..0b8cf44bc 100644 --- a/sdk-python/src/daytona/common/errors.py +++ b/sdk-python/src/daytona/common/errors.py @@ -259,6 +259,14 @@ class DaytonaGitMergeConflictError(DaytonaConflictError): """Git merge has conflicts that need manual resolution.""" +class DaytonaGitTransportFailedError(DaytonaBadGatewayError): + """The git remote was unreachable (DNS, TLS, connection or timeout failure).""" + + +class DaytonaGitRemoteRejectedError(DaytonaUnprocessableEntityError): + """The git remote rejected the operation (hooks, branch protection or quota).""" + + # Filesystem. class DaytonaFileNotFoundError(DaytonaNotFoundError): """Filesystem entry was not found.""" @@ -335,6 +343,8 @@ class DaytonaRecordingFfmpegNotFoundError(DaytonaServiceUnavailableError): (SOURCE_DAEMON, "GIT_PUSH_REJECTED"): DaytonaGitPushRejectedError, (SOURCE_DAEMON, "GIT_DIRTY_WORKTREE"): DaytonaGitDirtyWorktreeError, (SOURCE_DAEMON, "GIT_MERGE_CONFLICT"): DaytonaGitMergeConflictError, + (SOURCE_DAEMON, "GIT_TRANSPORT_FAILED"): DaytonaGitTransportFailedError, + (SOURCE_DAEMON, "GIT_REMOTE_REJECTED"): DaytonaGitRemoteRejectedError, # Daemon: filesystem (SOURCE_DAEMON, "FILE_NOT_FOUND"): DaytonaFileNotFoundError, (SOURCE_DAEMON, "FILE_ACCESS_DENIED"): DaytonaFileAccessDeniedError, diff --git a/sdk-python/tests/test_errors.py b/sdk-python/tests/test_errors.py index 331ccb6ae..8b281bd72 100644 --- a/sdk-python/tests/test_errors.py +++ b/sdk-python/tests/test_errors.py @@ -12,6 +12,8 @@ DaytonaConnectionError, DaytonaConnectionTimeoutError, DaytonaError, + DaytonaGitRemoteRejectedError, + DaytonaGitTransportFailedError, DaytonaGoneError, DaytonaInternalServerError, DaytonaNotFoundError, @@ -129,6 +131,30 @@ def test_create_daytona_error_uses_specific_subclass(self): assert isinstance(error, DaytonaNotFoundError) assert error.code == "NOT_FOUND" + def test_git_transport_failed_routes_to_bad_gateway_subclass(self): + error = create_daytona_error( + "dns lookup failed", + status_code=502, + code="GIT_TRANSPORT_FAILED", + source="DAYTONA_DAEMON", + ) + + assert isinstance(error, DaytonaGitTransportFailedError) + assert isinstance(error, DaytonaBadGatewayError) + assert error.code == "GIT_TRANSPORT_FAILED" + + def test_git_remote_rejected_routes_to_unprocessable_subclass(self): + error = create_daytona_error( + "pre-receive hook declined", + status_code=422, + code="GIT_REMOTE_REJECTED", + source="DAYTONA_DAEMON", + ) + + assert isinstance(error, DaytonaGitRemoteRejectedError) + assert isinstance(error, DaytonaUnprocessableEntityError) + assert error.code == "GIT_REMOTE_REJECTED" + class TestStatusCodeClassification: """Every HTTP status code that Daytona services actually emit has a typed diff --git a/sdk-ruby/lib/daytona/sdk/errors.rb b/sdk-ruby/lib/daytona/sdk/errors.rb index 6d2d3e321..26a9dfcfe 100644 --- a/sdk-ruby/lib/daytona/sdk/errors.rb +++ b/sdk-ruby/lib/daytona/sdk/errors.rb @@ -120,6 +120,8 @@ class GitBranchExistsError < ConflictError; end class GitPushRejectedError < ConflictError; end class GitDirtyWorktreeError < ConflictError; end class GitMergeConflictError < ConflictError; end + class GitTransportFailedError < BadGatewayError; end + class GitRemoteRejectedError < UnprocessableEntityError; end # Daemon: filesystem class FileNotFoundError < NotFoundError; end @@ -171,6 +173,8 @@ class RecordingFfmpegNotFoundError < ServiceUnavailableError; end [SOURCE_DAEMON, 'GIT_PUSH_REJECTED'] => GitPushRejectedError, [SOURCE_DAEMON, 'GIT_DIRTY_WORKTREE'] => GitDirtyWorktreeError, [SOURCE_DAEMON, 'GIT_MERGE_CONFLICT'] => GitMergeConflictError, + [SOURCE_DAEMON, 'GIT_TRANSPORT_FAILED'] => GitTransportFailedError, + [SOURCE_DAEMON, 'GIT_REMOTE_REJECTED'] => GitRemoteRejectedError, # Daemon: filesystem [SOURCE_DAEMON, 'FILE_NOT_FOUND'] => FileNotFoundError, diff --git a/sdk-ruby/spec/daytona/sdk/errors_spec.rb b/sdk-ruby/spec/daytona/sdk/errors_spec.rb index c06a24105..e9f035a07 100644 --- a/sdk-ruby/spec/daytona/sdk/errors_spec.rb +++ b/sdk-ruby/spec/daytona/sdk/errors_spec.rb @@ -66,6 +66,8 @@ described_class::GitPushRejectedError => described_class::ConflictError, described_class::GitDirtyWorktreeError => described_class::ConflictError, described_class::GitMergeConflictError => described_class::ConflictError, + described_class::GitTransportFailedError => described_class::BadGatewayError, + described_class::GitRemoteRejectedError => described_class::UnprocessableEntityError, described_class::FileNotFoundError => described_class::NotFoundError, described_class::FileAccessDeniedError => described_class::ForbiddenError, described_class::LspServerNotInitializedError => described_class::ValidationError, @@ -151,6 +153,24 @@ def api_error(status, body) expect(err.source).to eq('DAYTONA_DAEMON') end + it 'routes GIT_TRANSPORT_FAILED to GitTransportFailedError' do + body = '{"message":"dial tcp: lookup nonexistent.invalid: no such host","code":"GIT_TRANSPORT_FAILED","source":"DAYTONA_DAEMON"}' + err = described_class.wrap_error(api_error(502, body)) + + expect(err).to be_a(described_class::GitTransportFailedError) + expect(err).to be_a(described_class::BadGatewayError) # inheritance + expect(err.code).to eq('GIT_TRANSPORT_FAILED') + end + + it 'routes GIT_REMOTE_REJECTED to GitRemoteRejectedError' do + body = '{"message":"command error on refs/heads/main: pre-receive hook declined","code":"GIT_REMOTE_REJECTED","source":"DAYTONA_DAEMON"}' + err = described_class.wrap_error(api_error(422, body)) + + expect(err).to be_a(described_class::GitRemoteRejectedError) + expect(err).to be_a(described_class::UnprocessableEntityError) # inheritance + expect(err.code).to eq('GIT_REMOTE_REJECTED') + end + it 'prepends the prefix to the message' do err = described_class.wrap_error(api_error(409, '{"message":"exists"}'), 'Failed to add branch') diff --git a/sdk-typescript/src/__tests__/DaytonaError.test.ts b/sdk-typescript/src/__tests__/DaytonaError.test.ts index 05e460d94..5b96cc2cd 100644 --- a/sdk-typescript/src/__tests__/DaytonaError.test.ts +++ b/sdk-typescript/src/__tests__/DaytonaError.test.ts @@ -16,6 +16,8 @@ import { DaytonaError, DaytonaFileNotFoundError, DaytonaGitAuthFailedError, + DaytonaGitRemoteRejectedError, + DaytonaGitTransportFailedError, DaytonaGoneError, DaytonaInternalServerError, DaytonaNotFoundError, @@ -113,6 +115,20 @@ describe('Domain code classification with status-class inheritance', () => { expect(err).toBeInstanceOf(DaytonaServiceUnavailableError) }) + it('daemon GIT_TRANSPORT_FAILED inherits from DaytonaBadGatewayError', () => { + const err = createDaytonaError('dns lookup failed', 502, undefined, 'GIT_TRANSPORT_FAILED', 'DAYTONA_DAEMON') + expect(err).toBeInstanceOf(DaytonaGitTransportFailedError) + expect(err).toBeInstanceOf(DaytonaBadGatewayError) + expect(err.code).toBe('GIT_TRANSPORT_FAILED') + }) + + it('daemon GIT_REMOTE_REJECTED inherits from DaytonaUnprocessableEntityError', () => { + const err = createDaytonaError('pre-receive hook declined', 422, undefined, 'GIT_REMOTE_REJECTED', 'DAYTONA_DAEMON') + expect(err).toBeInstanceOf(DaytonaGitRemoteRejectedError) + expect(err).toBeInstanceOf(DaytonaUnprocessableEntityError) + expect(err.code).toBe('GIT_REMOTE_REJECTED') + }) + it('falls back to status class when (source, code) is unknown', () => { const err = createDaytonaError('mystery 404', 404, undefined, 'UNKNOWN_CODE', 'DAYTONA_DAEMON') expect(err).toBeInstanceOf(DaytonaNotFoundError) diff --git a/sdk-typescript/src/errors/DaytonaError.ts b/sdk-typescript/src/errors/DaytonaError.ts index ede19c465..30d63b8be 100644 --- a/sdk-typescript/src/errors/DaytonaError.ts +++ b/sdk-typescript/src/errors/DaytonaError.ts @@ -125,6 +125,10 @@ export class DaytonaGitPushRejectedError extends DaytonaConflictError {} export class DaytonaGitDirtyWorktreeError extends DaytonaConflictError {} /** A git merge produced conflicts (code `GIT_MERGE_CONFLICT`). */ export class DaytonaGitMergeConflictError extends DaytonaConflictError {} +/** The git remote was unreachable — DNS, TLS, connection or timeout failure (code `GIT_TRANSPORT_FAILED`). */ +export class DaytonaGitTransportFailedError extends DaytonaBadGatewayError {} +/** The git remote rejected the operation — hooks, branch protection or quota (code `GIT_REMOTE_REJECTED`). */ +export class DaytonaGitRemoteRejectedError extends DaytonaUnprocessableEntityError {} // --- Filesystem (daemon) --- /** The file does not exist in the sandbox (code `FILE_NOT_FOUND`). */ @@ -171,6 +175,8 @@ const CODE_TO_ERROR_CLASS: Record = { 'DAYTONA_DAEMON|GIT_PUSH_REJECTED': DaytonaGitPushRejectedError, 'DAYTONA_DAEMON|GIT_DIRTY_WORKTREE': DaytonaGitDirtyWorktreeError, 'DAYTONA_DAEMON|GIT_MERGE_CONFLICT': DaytonaGitMergeConflictError, + 'DAYTONA_DAEMON|GIT_TRANSPORT_FAILED': DaytonaGitTransportFailedError, + 'DAYTONA_DAEMON|GIT_REMOTE_REJECTED': DaytonaGitRemoteRejectedError, 'DAYTONA_DAEMON|FILE_NOT_FOUND': DaytonaFileNotFoundError, 'DAYTONA_DAEMON|FILE_ACCESS_DENIED': DaytonaFileAccessDeniedError, 'DAYTONA_DAEMON|LSP_SERVER_NOT_INITIALIZED': DaytonaLspServerNotInitializedError, diff --git a/sdk-typescript/src/index.ts b/sdk-typescript/src/index.ts index 832f7e742..bdfeae9d7 100644 --- a/sdk-typescript/src/index.ts +++ b/sdk-typescript/src/index.ts @@ -64,6 +64,8 @@ export { DaytonaGitPushRejectedError, DaytonaGitDirtyWorktreeError, DaytonaGitMergeConflictError, + DaytonaGitTransportFailedError, + DaytonaGitRemoteRejectedError, DaytonaFileNotFoundError, DaytonaFileAccessDeniedError, DaytonaLspServerNotInitializedError, diff --git a/toolbox-api-client-go/api/openapi.yaml b/toolbox-api-client-go/api/openapi.yaml index 12c248df3..1f887a12b 100644 --- a/toolbox-api-client-go/api/openapi.yaml +++ b/toolbox-api-client-go/api/openapi.yaml @@ -5859,6 +5859,8 @@ components: - GIT_PUSH_REJECTED - GIT_DIRTY_WORKTREE - GIT_MERGE_CONFLICT + - GIT_TRANSPORT_FAILED + - GIT_REMOTE_REJECTED - FILE_NOT_FOUND - FILE_ACCESS_DENIED - LSP_SERVER_NOT_INITIALIZED @@ -5888,6 +5890,8 @@ components: - CodeGitPushRejected - CodeGitDirtyWorktree - CodeGitMergeConflict + - CodeGitTransportFailed + - CodeGitRemoteRejected - CodeFileNotFound - CodeFileAccessDenied - CodeLspServerNotInitialized diff --git a/toolbox-api-client-go/model_daemon_error_code.go b/toolbox-api-client-go/model_daemon_error_code.go index 530080e72..ddc9f102b 100644 --- a/toolbox-api-client-go/model_daemon_error_code.go +++ b/toolbox-api-client-go/model_daemon_error_code.go @@ -26,6 +26,8 @@ const ( DAEMONERRORCODE_CodeGitPushRejected DaemonErrorCode = "GIT_PUSH_REJECTED" DAEMONERRORCODE_CodeGitDirtyWorktree DaemonErrorCode = "GIT_DIRTY_WORKTREE" DAEMONERRORCODE_CodeGitMergeConflict DaemonErrorCode = "GIT_MERGE_CONFLICT" + DAEMONERRORCODE_CodeGitTransportFailed DaemonErrorCode = "GIT_TRANSPORT_FAILED" + DAEMONERRORCODE_CodeGitRemoteRejected DaemonErrorCode = "GIT_REMOTE_REJECTED" DAEMONERRORCODE_CodeFileNotFound DaemonErrorCode = "FILE_NOT_FOUND" DAEMONERRORCODE_CodeFileAccessDenied DaemonErrorCode = "FILE_ACCESS_DENIED" DAEMONERRORCODE_CodeLspServerNotInitialized DaemonErrorCode = "LSP_SERVER_NOT_INITIALIZED" @@ -58,6 +60,8 @@ var AllowedDaemonErrorCodeEnumValues = []DaemonErrorCode{ "GIT_PUSH_REJECTED", "GIT_DIRTY_WORKTREE", "GIT_MERGE_CONFLICT", + "GIT_TRANSPORT_FAILED", + "GIT_REMOTE_REJECTED", "FILE_NOT_FOUND", "FILE_ACCESS_DENIED", "LSP_SERVER_NOT_INITIALIZED", diff --git a/toolbox-api-client-java/src/main/java/io/daytona/toolbox/client/model/DaemonErrorCode.java b/toolbox-api-client-java/src/main/java/io/daytona/toolbox/client/model/DaemonErrorCode.java index b93b57d45..425a9fa12 100644 --- a/toolbox-api-client-java/src/main/java/io/daytona/toolbox/client/model/DaemonErrorCode.java +++ b/toolbox-api-client-java/src/main/java/io/daytona/toolbox/client/model/DaemonErrorCode.java @@ -43,6 +43,10 @@ public enum DaemonErrorCode { CodeGitMergeConflict("GIT_MERGE_CONFLICT"), + CodeGitTransportFailed("GIT_TRANSPORT_FAILED"), + + CodeGitRemoteRejected("GIT_REMOTE_REJECTED"), + CodeFileNotFound("FILE_NOT_FOUND"), CodeFileAccessDenied("FILE_ACCESS_DENIED"), diff --git a/toolbox-api-client-python-async/daytona_toolbox_api_client_async/models/daemon_error_code.py b/toolbox-api-client-python-async/daytona_toolbox_api_client_async/models/daemon_error_code.py index d9dbc117b..56aeed738 100644 --- a/toolbox-api-client-python-async/daytona_toolbox_api_client_async/models/daemon_error_code.py +++ b/toolbox-api-client-python-async/daytona_toolbox_api_client_async/models/daemon_error_code.py @@ -33,6 +33,8 @@ class DaemonErrorCode(str, Enum): CodeGitPushRejected = 'GIT_PUSH_REJECTED' CodeGitDirtyWorktree = 'GIT_DIRTY_WORKTREE' CodeGitMergeConflict = 'GIT_MERGE_CONFLICT' + CodeGitTransportFailed = 'GIT_TRANSPORT_FAILED' + CodeGitRemoteRejected = 'GIT_REMOTE_REJECTED' CodeFileNotFound = 'FILE_NOT_FOUND' CodeFileAccessDenied = 'FILE_ACCESS_DENIED' CodeLspServerNotInitialized = 'LSP_SERVER_NOT_INITIALIZED' diff --git a/toolbox-api-client-python/daytona_toolbox_api_client/models/daemon_error_code.py b/toolbox-api-client-python/daytona_toolbox_api_client/models/daemon_error_code.py index d9dbc117b..56aeed738 100644 --- a/toolbox-api-client-python/daytona_toolbox_api_client/models/daemon_error_code.py +++ b/toolbox-api-client-python/daytona_toolbox_api_client/models/daemon_error_code.py @@ -33,6 +33,8 @@ class DaemonErrorCode(str, Enum): CodeGitPushRejected = 'GIT_PUSH_REJECTED' CodeGitDirtyWorktree = 'GIT_DIRTY_WORKTREE' CodeGitMergeConflict = 'GIT_MERGE_CONFLICT' + CodeGitTransportFailed = 'GIT_TRANSPORT_FAILED' + CodeGitRemoteRejected = 'GIT_REMOTE_REJECTED' CodeFileNotFound = 'FILE_NOT_FOUND' CodeFileAccessDenied = 'FILE_ACCESS_DENIED' CodeLspServerNotInitialized = 'LSP_SERVER_NOT_INITIALIZED' diff --git a/toolbox-api-client/src/models/daemon-error-code.ts b/toolbox-api-client/src/models/daemon-error-code.ts index 42ece9d56..ecd965a19 100644 --- a/toolbox-api-client/src/models/daemon-error-code.ts +++ b/toolbox-api-client/src/models/daemon-error-code.ts @@ -23,6 +23,8 @@ export const DaemonErrorCode = { CodeGitPushRejected: 'GIT_PUSH_REJECTED', CodeGitDirtyWorktree: 'GIT_DIRTY_WORKTREE', CodeGitMergeConflict: 'GIT_MERGE_CONFLICT', + CodeGitTransportFailed: 'GIT_TRANSPORT_FAILED', + CodeGitRemoteRejected: 'GIT_REMOTE_REJECTED', CodeFileNotFound: 'FILE_NOT_FOUND', CodeFileAccessDenied: 'FILE_ACCESS_DENIED', CodeLspServerNotInitialized: 'LSP_SERVER_NOT_INITIALIZED',