# Change password ticket result url does not include custom error message

**URL:** <https://community.auth0.com/t/change-password-ticket-result-url-does-not-include-custom-error-message/7643>\
**Category:** Get Help\
**Tags:** change-password\
**Created:** [July 24, 2017, 11:05pm UTC](https://community.auth0.com/t/change-password-ticket-result-url-does-not-include-custom-error-message/7643 "2017-07-24T23:05:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tporter](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@tporter](https://community.auth0.com/u/tporter)\
**Post date:** [July 24, 2017, 11:05pm UTC](https://community.auth0.com/t/change-password-ticket-result-url-does-not-include-custom-error-message/7643/1 "2017-07-24T23:05:34Z")

</div>

I’m having trouble getting the custom error message the Change Password database action script returns on error to be appended to the result url when I create change password tickets.

The default Change Password script template comments says the following:

```
  // There are three ways that this script can finish:
  // 1. The user's password was updated successfully:
  // callback(null, true);
  // 2. The user's password was not updated:
  // callback(null, false);
  // 3. Something went wrong while trying to reach your database:
  // callback(new Error("my error message"));

    // If an error is returned, it will be passed to the query string of the page
  // where the user is being redirected to after clicking the confirmation link.
  // For example, returning `callback(new Error("error"))` and redirecting to
  // https://example.com would redirect to the following URL:
  // https://example.com?email=alice%40example.com&message=error&success=false

```

I’m trying this as a test:

```
function changePassword (email, newPassword, callback) {
    callback(new Error('error message'));
}

```

But the redirect url always looks like this:

```
http://localhost:3000/?email=foo%40bar.com&success=false&message=The%20operation%20cannot%20be%20completed.%20Please%20try%20again.

```

Am I misinterpreting this expected behaviour here or is something not working as expected?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:55am UTC](https://community.auth0.com/t/change-password-ticket-result-url-does-not-include-custom-error-message/7643/2 "2018-03-02T05:55:35Z")

</div>


