Improve error message for Parse.Error.INCORRECT_TYPE failure condition (#2185)
This commit is contained in:
@@ -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}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user