Commit 5c731026 authored by Suzy Li's avatar Suzy Li Committed by Commit Bot

Change AbortError Message

The Abort operation is triggered by the RP, and returns the AbortError.
The current error massage for AbortError is "The user aborted a
request.". The change makes the AbortError massage as
"The Rely Party aborted a request."

Bug: n/a
Change-Id: Iea3991f930ba039d05ec7279aa4b3191303c836f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1642685Reviewed-by: default avatarKim Paulhamus <kpaulhamus@chromium.org>
Commit-Queue: Suzy Li <suzyli@google.com>
Cr-Commit-Position: refs/heads/master@{#666096}
parent 99cc4c98
...@@ -95,7 +95,7 @@ constexpr char kRelyingPartyRpIconUrlSecurityErrorMessage[] = ...@@ -95,7 +95,7 @@ constexpr char kRelyingPartyRpIconUrlSecurityErrorMessage[] =
"webauth: SecurityError: 'rp.icon' should be a secure URL"; "webauth: SecurityError: 'rp.icon' should be a secure URL";
constexpr char kAbortErrorMessage[] = constexpr char kAbortErrorMessage[] =
"webauth: AbortError: The user aborted a request."; "webauth: AbortError: Request has been aborted.";
// Templates to be used with base::ReplaceStringPlaceholders. Can be // Templates to be used with base::ReplaceStringPlaceholders. Can be
// modified to include up to 9 replacements. The default values for // modified to include up to 9 replacements. The default values for
......
...@@ -292,7 +292,8 @@ DOMException* CredentialManagerErrorToDOMException( ...@@ -292,7 +292,8 @@ DOMException* CredentialManagerErrorToDOMException(
"this device unless the device is secured " "this device unless the device is secured "
"with a screen lock."); "with a screen lock.");
case CredentialManagerError::ABORT: case CredentialManagerError::ABORT:
return MakeGarbageCollected<DOMException>(DOMExceptionCode::kAbortError); return MakeGarbageCollected<DOMException>(DOMExceptionCode::kAbortError,
"Request has been aborted.");
case CredentialManagerError::UNKNOWN: case CredentialManagerError::UNKNOWN:
return MakeGarbageCollected<DOMException>( return MakeGarbageCollected<DOMException>(
DOMExceptionCode::kNotReadableError, DOMExceptionCode::kNotReadableError,
...@@ -523,8 +524,8 @@ ScriptPromise CredentialsContainer::get( ...@@ -523,8 +524,8 @@ ScriptPromise CredentialsContainer::get(
if (options->hasSignal()) { if (options->hasSignal()) {
if (options->signal()->aborted()) { if (options->signal()->aborted()) {
resolver->Reject( resolver->Reject(MakeGarbageCollected<DOMException>(
MakeGarbageCollected<DOMException>(DOMExceptionCode::kAbortError)); DOMExceptionCode::kAbortError, "Request has been aborted."));
return promise; return promise;
} }
options->signal()->AddAlgorithm( options->signal()->AddAlgorithm(
...@@ -705,8 +706,8 @@ ScriptPromise CredentialsContainer::create( ...@@ -705,8 +706,8 @@ ScriptPromise CredentialsContainer::create(
if (options->hasSignal()) { if (options->hasSignal()) {
if (options->signal()->aborted()) { if (options->signal()->aborted()) {
resolver->Reject( resolver->Reject(MakeGarbageCollected<DOMException>(
MakeGarbageCollected<DOMException>(DOMExceptionCode::kAbortError)); DOMExceptionCode::kAbortError, "Request has been aborted."));
return promise; return promise;
} }
options->signal()->AddAlgorithm( options->signal()->AddAlgorithm(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment