Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
Is it possible to handle _bsontype error when do query to mongodb?

When i try to do a query to mongodb by aggregation with _bsontype key inside $sort stage, for example: {$sort: {_bsontype: -1}}, i received an error: TypeError: Unrecognized or invalid _bsontype: -1

Current error example in code after performing aggregation

$sort stage with _bsontype value

I receive _bsontype key from a query params url when doing GET request to a specific route and then create specific stages inside some method programmatically.

But when I paste something else instead of _bsontype in query params, for example: _bjontype, just replace 1 letter, everything works properly, the problem is only with _bsontype value.

Does anyone faced with such a problem?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda