feat(sdk): add GIT_TRANSPORT_FAILED and GIT_REMOTE_REJECTED error types across all SDKs - #144
Open
MDzaja wants to merge 1 commit into
Open
feat(sdk): add GIT_TRANSPORT_FAILED and GIT_REMOTE_REJECTED error types across all SDKs#144MDzaja wants to merge 1 commit into
MDzaja wants to merge 1 commit into
Conversation
…es across all SDKs Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
Vidoc security reviewTip Good to merge — no security issues found. Reviewed 21 changed files. 💬 Have questions? Tag @vidoc in a comment and I'll answer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
GIT_TRANSPORT_FAILED(502) andGIT_REMOTE_REJECTED(422) daemon error codesfor git transport failures (DNS/TLS/connection/timeout) and remote-side push
rejections (hooks, branch protection, quota).
Changes
DaemonErrorCodeenum inopenapi-specs/toolbox.json(targeted patch, matching the daemon's regeneratedswagger).
toolbox-api-client*packages(TS, Go, Python, Python-async, Ruby, Java) — enum-only diffs.
(source, code)per the existing pattern, eachinheriting from its HTTP-status class so both catch levels work:
DaytonaGitTransportFailedErrorDaytonaGitRemoteRejectedErrorDaytonaGitTransportFailedErrorDaytonaGitRemoteRejectedErrorErrGitTransportFailedsentinelErrGitRemoteRejectedsentinelGitTransportFailedErrorGitRemoteRejectedErrorDaytonaGitTransportFailedExceptionDaytonaGitRemoteRejectedExceptionBackwards compatible: older daemons that still return 500 keep surfacing
DaytonaInternalServerError; the new classes only activate on the new codes.Example
Summary by cubic
Add
GIT_TRANSPORT_FAILED(502) andGIT_REMOTE_REJECTED(422) daemon error codes and map them to typed errors across all SDKs. This lets apps distinguish network/TLS/DNS failures from remote-side push rejections and handle them reliably.DaemonErrorCodeinopenapi-specs/toolbox.json.toolbox-api-client,toolbox-api-client-go,toolbox-api-client-python,toolbox-api-client-python-async,toolbox-api-client-java(enum-only).DaytonaGitTransportFailedError,DaytonaGitRemoteRejectedErrorDaytonaGitTransportFailedError,DaytonaGitRemoteRejectedErrorErrGitTransportFailed,ErrGitRemoteRejectedGitTransportFailedError,GitRemoteRejectedErrorDaytonaGitTransportFailedException,DaytonaGitRemoteRejectedExceptionWritten for commit 114e185. Summary will update on new commits.