Documentation of API error codes

Open
#920 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 14 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api, documentation

Research direction

The issue asks for a human-readable reference of HTTP status codes and error conditions per API endpoint, plus whether JSON errors always include a detail field. Start from existing API docs and the code that raises or serializes errors for each endpoint. Confirm observed status codes and payloads against the implementation. Done when docs list those conditions per endpoint; issue #359 is noted as a possible later source of the same information.

Written by the indexing model from the issue text.

Description

The docs currently do not contain a lot of information on possible error codes and conditions returned by the API. API clients therefore need to implement error handling based on observations and assumptions, and can not rely on documented behaviour.

It would be nice to have a reference of possible error conditions and HTTP status codes for each endpoint.
Furthermore, I noticed that errors seem to contain JSON data with a human-readable error message in the detail field. Is this always the case? At a quick glance, it seems to be. But I could not find any reliable information.

I believe, #359 has the potential to naturally provide this kind of information. In the mean time, a human-readable documentation would help.

Dominant language
Python
Stars
678
Forks
74
Avg merge
7d 23h
Merged PRs (30d)
1

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

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 desec-io/desec-stack

All issues in desec-io/desec-stack

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.