HTTP Error 500: Internal Server Error when calling get_audit_log with "after" variable
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
Inizia in /opt/conda/lib/python3.9/site-packages/ghapi/core.py e confronta il modo in cui get_audit_log costruisce la richiesta con e senza l’argomento after. Controlla la documentazione dell’API audit-log di GitHub e riproduci la chiamata fornita usando i formati di data e timestamp documentati; il lavoro è completato quando il formato supportato viene gestito correttamente oppure il valore non valido produce un errore chiaro, con il formato previsto documentato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
api.orgs.get_audit_log(ORG, per_page=10, page=2, after="2021-09-27T15:05:06+01:00")
// Here I'm using time format as per GHAPI rest docs. ghapi python docs suggest 2021-09-27 should work. Tried
// this and also timestamps, but all gave internal error.
If i remove the "after" variable, the call works fine.
I believe the problem is that the "after" variable is in [Link header format](api.orgs.get_audit_log(ORG, per_page=10, page=2, after="2021-09-27T15:05:06+01:00")) and perhaps this doesn't get autogenerated correctly.
Link: https://api.github.com/orgs/ORG/audit-log?after=MTYwMTkxOTU5NjQxM3xZbGI4VE5EZ1dvZTlla09uWjhoZFpR&before=; rel="next",
The value between after= and & does not completely URL + base64 decode to an obvious time format.
Signature:
api.orgs.get_audit_log(
org,
phrase=None,
include=None,
after=None,
before=None,
order=None,
per_page=None,
page=None,
)
Type: _GhVerb
String form:
orgs.get_audit_log(org, phrase=None, include=None, after=None, before=None, order=None, per_page=None, page=None)
https://docs.github.com/rest/reference/orgs#get-audit-log
File: /opt/conda/lib/python3.9/site-packages/ghapi/core.py
I would expect any values in the signature to specify the time format required, possibly add an example to the docs, and the error should be something less severe than a 500 internal error.
- Lingua principale
- Python
- Stelle
- 687
- Fork
- 69
- Merge medio
- 1m
- PR unite (30g)
- 2
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di AnswerDotAI/ghapi
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
AnswerDotAI/ghapi#158 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
AnswerDotAI/ghapi#120 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
AnswerDotAI/ghapi#208 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
AnswerDotAI/ghapi#201 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
AnswerDotAI/ghapi#186 ·
Tutte le issue di AnswerDotAI/ghapi
Issue simili
-
agent-ready documentation needs-triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
instance instance add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
searxng/searx-instances#939 · 1 commento ·
-
area-deployment area-integrations triage:bot-seen
Difficoltà 2/5 Mezza giornata Idoneità per principianti 86/100