Error: invalid memory address or nil pointer dereference, when change password


I am running on Skygear’s Cloud Function and here is the code:

    try {
        await container.auth.changePassword(request.get('current_password'), request.get('new_password'));
        return response.setResult({
            'message': 'OK',
    } catch (error) {
        return error;

And it throws me an error along with changing password successfully in DB:
{ "status": 500, "error": { "name": "UnexpectedError", "code": 10000, "message": "panic occurred while handling request: runtime error: invalid memory address or nil pointer dereference" } }

Can you help me?


Let us have a look and get back to you soon!