Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

HTTP Error 500: Internal Server Error when calling get_audit_log with "after" variable

Aperta
#101 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
github, python
Ambito
api

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AnswerDotAI/ghapi

Tutte le issue di AnswerDotAI/ghapi

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.