Skip to content

docs: Document raised exceptions in client methods#3383

Open
andreahlert wants to merge 1 commit intoflyteorg:masterfrom
andreahlert:docs/document-client-exceptions
Open

docs: Document raised exceptions in client methods#3383
andreahlert wants to merge 1 commit intoflyteorg:masterfrom
andreahlert:docs/document-client-exceptions

Conversation

@andreahlert
Copy link

Summary

  • Replace :raises: TODO placeholders with actual exception documentation in RawSynchronousFlyteClient and SynchronousFlyteClient methods
  • Document 16 methods across raw.py and friendly.py

Changes

The documented exceptions are based on the RetryExceptionWrapperInterceptor which converts gRPC status codes to Flyte exceptions:

gRPC Status Flyte Exception
UNAUTHENTICATED FlyteAuthenticationException
NOT_FOUND FlyteEntityNotExistException
ALREADY_EXISTS FlyteEntityAlreadyExistsException
INVALID_ARGUMENT FlyteInvalidInputException
UNAVAILABLE FlyteSystemUnavailableException
Other FlyteSystemException

Why

This improves API documentation and helps users understand what exceptions to expect when using the client methods, enabling better error handling in their code.

Test plan

  • Documentation-only change, no functional code modified
  • Verified exception types match wrap_exception_interceptor.py logic

Replace `:raises: TODO` placeholders with actual exception documentation
in RawSynchronousFlyteClient and SynchronousFlyteClient methods.

The documented exceptions are based on the RetryExceptionWrapperInterceptor
which converts gRPC status codes to Flyte exceptions:
- FlyteAuthenticationException (UNAUTHENTICATED)
- FlyteEntityNotExistException (NOT_FOUND)
- FlyteEntityAlreadyExistsException (ALREADY_EXISTS)
- FlyteInvalidInputException (INVALID_ARGUMENT)
- FlyteSystemException (other errors)

This improves API documentation and helps users understand what
exceptions to expect when using the client methods.
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.

1 participant