Skip to content

Refactor CLI tool: Improved error handling, added status code check#6

Merged
nvima merged 2 commits intomainfrom
refactor-error-handling-status-code
Apr 22, 2023
Merged

Refactor CLI tool: Improved error handling, added status code check#6
nvima merged 2 commits intomainfrom
refactor-error-handling-status-code

Conversation

@nvima
Copy link
Owner

@nvima nvima commented Apr 22, 2023

This commit includes a major refactor of the CLI tool. It introduces better error handling by utilizing custom TplError structs with error messages and exit codes. This allows for more informative error messages and proper exit codes for various error scenarios.

Additionally, an optional statuscode attribute has been added to the YAML configuration, allowing users to specify the expected status code for API responses. If provided, the tool will check the API response status code against the expected value before parsing the output, and return an error message if they do not match.

nvima added 2 commits April 22, 2023 22:49
This commit includes a major refactor of the CLI tool. It introduces
better error handling by utilizing custom TplError structs with error
messages and exit codes. This allows for more informative error messages
and proper exit codes for various error scenarios.

Additionally, an optional `statuscode` attribute has been added to the
YAML configuration, allowing users to specify the expected status code
for API responses. If provided, the tool will check the API response
status code against the expected value before parsing the output, and
return an error message if they do not match.
@nvima nvima merged commit dd17259 into main Apr 22, 2023
@nvima nvima deleted the refactor-error-handling-status-code branch April 22, 2023 20:53
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