Always throw a RuntimeError on error response

Open
#41 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
cli

Research direction

Start in src/aerie_cli/aerie_host.py around lines 74-77 and trace how an HTTP 200 response containing an error is handled. Done means that this error response raises RuntimeError so applications using the Python API can handle it, rather than only printing the error message.

Written by the indexing model from the issue text.

Description

enhancement

Currently, "valid" (i.e., HTTP return 200) responses are handed by printing the error message. This was an improvement in that, previously, the missing data would cause a cryptic error, but should be updated such that a RuntimeError is still thrown to allow proper error handling in applications that use the Python API.

https://github.com/NASA-AMMOS/aerie-cli/blob/adf6ed910362f4e3f2cac371da6f7d972741033b/src/aerie_cli/aerie_host.py#L74-L77

Dominant language
Python
Stars
5
Forks
7
Avg merge
3d 14h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NASA-AMMOS/plandev-cli

All issues in NASA-AMMOS/plandev-cli

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.