Welcome to the Auth0 Community Forum!
I am not sure what library you are referring to by just seeing the code, but I would assume this method utilizes the dbconnections/change-password endpoint:
This endpoint will give a successful response to any email, regardless of whether or not the email exists in your user database. This is a security mechanism that prevents a third party from being able to test emails against the endpoint and receive confirmation that an email exists in your DB.
The endpoint will give errors on other requests that are not formatted or have incorrect connections or client ids.
If you are experiencing something else, that may be abnormal. Please provide more information if this is the case.
Hope this helps!