l3montree-dev / l3montree-dev/devguard
Registration submission fails: self-service/registration returns 500 HTML error page
Open
Nobody has claimed this yet.
bug
priority:high
- Dominant language
- Go
- Stars
- 161
- Forks
- 43
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 37
Description
Error
ResponseError: The Ory API endpoint returned an unexpected HTML or text response. Check your console output for details.
Stack trace
<anonymous> (@ory/elements-react/src/util/sdk-helpers/utils.ts:191)
← sO / onSubmitRegistration (@ory/elements-react/src/util/onSubmitRegistration.ts:39)
← <anonymous> / useOryFormSubmit (@ory/elements-react/src/components/form/useOryFormSubmit.ts:124)
← <anonymous> / react-hook-form createFormControl.ts:1614
Source (node_modules/@ory/elements-react/src/util/sdk-helpers/utils.ts:186-196)
contentType.includes("text/") ||
contentType.includes("html") ||
contentType.includes("xml")
) {
// Handle human-readable content
await logResponseError(err.response, true)
throw new ResponseError(
err.response,
`The Ory API endpoint returned an unexpected HTML or text response. Check your console output for details.`,
)
}
Request context
- URL:
https://main.devguard.org/registration?flow=b4e9c21d-2488-40f3-9f1d-3e9813e58352 - Culprit route:
/registration - User submitted the registration form (name, email, confirmed-terms checkbox, submit) after which
POST https://main.devguard.org/self-service/registration?flow=b4e9c21d-2488-40f3-9f1d-3e9813e58352returned500with an HTML/text body instead of JSON, which the Ory Elements SDK can't decode ("Unable to decode API response"). - A React error #418 (hydration mismatch) was also logged as a breadcrumb on page load, ~24s before the form submission — same recurring issue as issue 3305 and related issues.
- User agent: HeadlessChrome — likely an automated/synthetic test rather than a real user, but the underlying 500 on registration submit would affect real users too.
GlitchTip
- Issue: https://error-tracking.devguard.org/devguard/issues/3829
- Event ID: 019fc7006be971ecb22da2d43de04bf8
- First seen: 2026-08-03T09:42:01.346Z
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the POST to /self-service/registration from the reported /registration flow and inspect the GlitchTip event and server response. Read the SDK handling in node_modules/@ory/elements-react/src/util/sdk-helpers/utils.ts and the cited onSubmitRegistration.ts path to understand the failure boundary. Done means registration no longer returns a 500 HTML/text response and the form receives the expected API response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, react, typescript
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100