Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Use consistent return types/exceptions in method "get_files()" #53

Open
uniqueg opened this issue Dec 7, 2021 · 0 comments
Open

Use consistent return types/exceptions in method "get_files()" #53

uniqueg opened this issue Dec 7, 2021 · 0 comments
Assignees
Labels
priority: high High priority type: style Related to code style workload: hours Likely takes hours to resolve

Comments

@uniqueg
Copy link
Member

uniqueg commented Dec 7, 2021

Currently, get_files() returns way too many possible response types and raising of exceptions is inconsistent when setting or not setting format=zip. Moreover, the current behavior is not documented correctly.

Unmarshalled responses should only be returned if TRSClient is configured to run in debug mode (as documented). Otherwise, either an object of type trs_cli.models.error (if there's a non-200 response from the TRS), of type Path (if format=zip and all went well) or of type List[ToolFile] (if format=None and all went well) is to be returned. Exceptions (as currently documented) should also be returned consistently, regardless of what format is specified.

@uniqueg uniqueg self-assigned this Dec 7, 2021
@uniqueg uniqueg added priority: high High priority type: style Related to code style workload: hours Likely takes hours to resolve labels Dec 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: high High priority type: style Related to code style workload: hours Likely takes hours to resolve
Projects
None yet
Development

No branches or pull requests

1 participant