Skip to content

webcrypto: Add error messages for webcrypto crate. - #46478

Merged
kkoyung merged 3 commits into
servo:mainfrom
eachra-bawn:webcrypto-error-msgs
Jul 14, 2026
Merged

webcrypto: Add error messages for webcrypto crate.#46478
kkoyung merged 3 commits into
servo:mainfrom
eachra-bawn:webcrypto-error-msgs

Conversation

@eachra-bawn

Copy link
Copy Markdown
Contributor

Related issue: #40756

Testing: No new tests.

Related issue: servo#40756

Signed-off-by: eachra-bawn <mulhalloisin@gmail.com>
@eachra-bawn
eachra-bawn requested a review from gterzian as a code owner July 13, 2026 15:53
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 13, 2026

@kkoyung kkoyung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! We have many missing error messages in WebCrypto that need to be added.

Some suggested wording is provided below.

Comment thread components/script/dom/webcrypto/subtlecrypto/ecdsa_operation.rs Outdated
Comment thread components/script/dom/webcrypto/subtlecrypto/x25519_operation.rs Outdated
Comment thread components/script/dom/webcrypto/subtlecrypto/x25519_operation.rs Outdated
Comment thread components/script/dom/webcrypto/subtlecrypto/x25519_operation.rs Outdated
Comment thread components/script/dom/webcrypto/subtlecrypto/x25519_operation.rs Outdated
Comment thread components/script/dom/webcrypto/subtlecrypto.rs Outdated
Comment thread components/script/dom/webcrypto/subtlecrypto.rs Outdated
Comment thread components/script/dom/webcrypto/subtlecrypto/x25519_operation.rs Outdated
Comment thread components/script/dom/webcrypto/subtlecrypto/pbkdf2_operation.rs Outdated
@servo-highfive servo-highfive added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 13, 2026
Signed-off-by: eachra-bawn <mulhalloisin@gmail.com>
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Jul 14, 2026
Signed-off-by: eachra-bawn <mulhalloisin@gmail.com>

@kkoyung kkoyung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good now. Thanks!

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jul 14, 2026
@kkoyung
kkoyung added this pull request to the merge queue Jul 14, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jul 14, 2026
Merged via the queue into servo:main with commit 888101d Jul 14, 2026
31 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jul 14, 2026
pull Bot pushed a commit to Haofei/servo that referenced this pull request Jul 22, 2026
… crates. (servo#46699)

As agreed on
[Zulip](https://servo.zulipchat.com/#narrow/channel/263398-general/topic/Expectation.20for.20error.20messages.20in.20PRs),
we've been asking contributors to add error messages to new uses of the
Error enum in their PRs. To reduce inconsistency in reviews, I propose a
ratchet mechanism in our test-tidy checks. By adding a list of explicit
counts of allowed exceptions per file, we can prevent introducing new
uses in each file and lower the number of allowed exceptions every time
a PR like servo#46478 is opened.

Testing: New addition to test-tidy.
Fixes: part of servo#40756

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants