exercism / exercism/website

TypeError: Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': Policy with name "default" already exists.

Open
#9,455 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
548
Forks
168
Avg merge
1d 3h
Merged PRs (30d)
28

Description

## Error

```
Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': Policy with name "default" already exists.
```

## Stack trace

```
:4 in injectedFunction
:15
```

## Tracking Details
- **Project**: exercism-js
- **Sentry**: [TypeError: Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': Policy with name "default" already exists.](https://thalamus-ai.sentry.io/issues/144134777/)
- **Culprit**: injectedFunction()
- **First seen:** Sep 1, 2026

Contributor guide

Open the contributing guide

Research direction

Start with the linked Sentry issue and its injectedFunction stack trace; the payload does not identify a source file or test. Trace the code that calls createPolicy and determine the intended behavior when the default policy already exists. Done means the reported error no longer occurs without breaking Trusted Types behavior, with a regression test if the relevant test location is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.