Incorrect behaviour with "undefined" query parameter.
- Lenguaje dominante
- JavaScript
- Estrellas
- 2k
- Forks
- 238
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Controller Coffeescript:
User.findOne {where: { confirmation_token: token }}, (err, user) -> ...
if token variable is undefined then I get the following error:
500 TypeError: Cannot read property 'constructor' of undefined
And there are no any reference to the controller which throws above error
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Look at the User.findOne method in the ORM's codebase, likely in a model or adapter file. The error suggests the token parameter is undefined when passed to a database query. Start by finding where confirmation_token is processed and add a guard to check for undefined. Run the controller test suite to verify the fix handles undefined without a 500 error.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- coffeescript, javascript, nodejs
- Área
- backend, databases
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100