HTTP Error 500: Internal Server Error when calling get_audit_log with "after" variable
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 42/100
Línea de trabajo
Comienza en /opt/conda/lib/python3.9/site-packages/ghapi/core.py y compara cómo get_audit_log construye la solicitud con y sin el argumento after. Consulta la documentación de la API de audit-log de GitHub y reproduce la llamada proporcionada usando los formatos de fecha y marca de tiempo documentados; se considera terminado cuando el formato compatible se gestiona correctamente o el valor no válido produce un error claro, con el formato esperado documentado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 687
- Forks
- 69
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de AnswerDotAI/ghapi
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
AnswerDotAI/ghapi#158 ·
-
Small fix needed to enable GHESAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
AnswerDotAI/ghapi#120 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 58/100
AnswerDotAI/ghapi#208 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
AnswerDotAI/ghapi#201 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
AnswerDotAI/ghapi#186 ·
Todos los issues de AnswerDotAI/ghapi
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
aws-samples/sample-per-model-bedrock#191 ·
Los mantenedores suelen responder en 1 día
-
area: docs enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
PyTomography/PyTomography#331 ·
Los mantenedores suelen responder en 1 día
-
effort: low prio: low ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
digitalfabrik/integreat-cms#4616 ·
Los mantenedores suelen responder en 5 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
FuRongJun-1999/dsh-memory#226 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug difficulty:2 good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
MakazhanAlpamys/Soup#1865 ·
Los mantenedores suelen responder en 1 día