You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in some cases the body's status code will disagree with the actual responses status code. for example if the update is malformed. also when testing if a hacker can check themselves into an event the error format completely changes (potentially it is getting handled by pymongo). There was no status code in the body and the response code was 200. the body was {errorMessage: '$set' is empty. You must specify a field like so: {$set: {<field>: ...}}, errorType: WriteError, stackTrace: [[/var/task/schemas.py, 17, wrapt, return config.add_cors_headers(fn(event, context, *extras))], [/var/task/schemas.py, 46, wrapt, return fn(event, context, results, *args)], [/var/task/validate.py, 246, update, tests.update_one({'email': event['user_email']}, updates)], [/var/task/pymongo/collection.py, 975, update_one, session=session),], [/var/task/pymongo/collection.py, 835, _update_retryable, _update, session)], [/var/task/pymongo/mongo_client.py, 1099, _retryable_write, return self._retry_with_session(retryable, func, s, None)], [/var/task/pymongo/mongo_client.py, 1076, _retry_with_session, return func(session, sock_info, retryable)], [/var/task/pymongo/collection.py, 831, _update, retryable_write=retryable_write)], [/var/task/pymongo/collection.py, 797, _update, _check_write_command_response(result)], [/var/task/pymongo/helpers.py, 208, _check_write_command_response, _raise_last_write_error(write_errors)], [/var/task/pymongo/helpers.py, 190, _raise_last_write_error, raise WriteError(error.get("errmsg"), error.get("code"), error)]]}
this may have been caused by realizing a hacker shouldn't be able to check them self in for an event and deleteing that update, thus leaving an empty update object.
The text was updated successfully, but these errors were encountered:
For easier dev, the validator just throws out invalid changes, but really, it should just return some sort of partial result indicating that some of the updates were invalid.
in some cases the body's status code will disagree with the actual responses status code. for example if the update is malformed. also when testing if a hacker can check themselves into an event the error format completely changes (potentially it is getting handled by pymongo). There was no status code in the body and the response code was 200. the body was
{errorMessage: '$set' is empty. You must specify a field like so: {$set: {<field>: ...}}, errorType: WriteError, stackTrace: [[/var/task/schemas.py, 17, wrapt, return config.add_cors_headers(fn(event, context, *extras))], [/var/task/schemas.py, 46, wrapt, return fn(event, context, results, *args)], [/var/task/validate.py, 246, update, tests.update_one({'email': event['user_email']}, updates)], [/var/task/pymongo/collection.py, 975, update_one, session=session),], [/var/task/pymongo/collection.py, 835, _update_retryable, _update, session)], [/var/task/pymongo/mongo_client.py, 1099, _retryable_write, return self._retry_with_session(retryable, func, s, None)], [/var/task/pymongo/mongo_client.py, 1076, _retry_with_session, return func(session, sock_info, retryable)], [/var/task/pymongo/collection.py, 831, _update, retryable_write=retryable_write)], [/var/task/pymongo/collection.py, 797, _update, _check_write_command_response(result)], [/var/task/pymongo/helpers.py, 208, _check_write_command_response, _raise_last_write_error(write_errors)], [/var/task/pymongo/helpers.py, 190, _raise_last_write_error, raise WriteError(error.get("errmsg"), error.get("code"), error)]]}
this may have been caused by realizing a hacker shouldn't be able to check them self in for an event and deleteing that update, thus leaving an empty update object.
The text was updated successfully, but these errors were encountered: