Improve error message for Parse.Error.INCORRECT_TYPE failure condition (#2185)

This commit is contained in:
Andrew Lane
2016-07-02 09:11:35 -04:00
committed by Tyler Brock
parent d1cdea00af
commit b641712d4d

View File

@@ -518,7 +518,7 @@ class SchemaController {
if (!dbTypeMatchesObjectType(expectedType, type)) { if (!dbTypeMatchesObjectType(expectedType, type)) {
throw new Parse.Error( throw new Parse.Error(
Parse.Error.INCORRECT_TYPE, Parse.Error.INCORRECT_TYPE,
`schema mismatch for ${className}.${fieldName}; expected ${expectedType.type || expectedType} but got ${type}` `schema mismatch for ${className}.${fieldName}; expected ${expectedType.type || expectedType} but got ${type.type}`
); );
} }
} }