Skip to main content

mongo_object_to_parse

Function mongo_object_to_parse 

Source
pub fn mongo_object_to_parse(
    schema: &ClassSchema,
    doc: &Document,
) -> Result<ParseMap, ParseError>
Expand description

mongoObjectToParseObject.

UPSTREAM-QUIRK: an unrecognised _-prefixed key raises, and it raises a bare JavaScript string rather than a Parse.Error (MongoTransform.js:1236-1237). On the aggregate path that surfaces to the client as code 102 with an undefined message. Reproduced here as an error, though parse-rust cannot reproduce the undefined message without inventing one.

UPSTREAM-QUIRK: the timestamp columns do not all raise to the same wire form. createdAt, updatedAt and lastUsed become bare ISO strings while expiresAt keeps a full {"__type":"Date"} envelope, all at the top level of the same object (MongoTransform.js:1172-1187). Every one of them is a ParseValue::Date here, and the position-dependent flattening happens once at the response boundary, so there is a single place to audit rather than a rule spread across the transform.