(error, className, auth, config)
| 324 | } |
| 325 | |
| 326 | function handleSessionMissingError(error, className, auth, config) { |
| 327 | // If we're trying to update a user without / with bad session token |
| 328 | if ( |
| 329 | className === '_User' && |
| 330 | error.code === Parse.Error.OBJECT_NOT_FOUND && |
| 331 | !auth.isMaster && |
| 332 | !auth.isMaintenance |
| 333 | ) { |
| 334 | throw createSanitizedError(Parse.Error.SESSION_MISSING, 'Insufficient auth.', config); |
| 335 | } |
| 336 | throw error; |
| 337 | } |
| 338 | |
| 339 | module.exports = { |
| 340 | create, |
no test coverage detected