Skip to content

feat(http): stabilize Problem Details - #7270

Open
tomas-zijdemans wants to merge 2 commits into
denoland:mainfrom
tomas-zijdemans:stabilize-problem-details
Open

feat(http): stabilize Problem Details#7270
tomas-zijdemans wants to merge 2 commits into
denoland:mainfrom
tomas-zijdemans:stabilize-problem-details

Conversation

@tomas-zijdemans

@tomas-zijdemans tomas-zijdemans commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Stabilizes @std/http/problem-details, the RFC 9457 Problem Details module. It has been unstable since #7033 (March 2026), was reshaped once in #7117, and has sat untouched since: no open issues, no bug reports, 38 tests.

Changes

  • Renames http/unstable_problem_details.ts to http/problem_details.ts (test file too) and moves the export to @std/http/problem-details
  • Removes the @experimental tags
  • Re-exports from http/mod.ts and adds a short Problem Details section to the package doc
  • Rewords the isProblemDetailsResponse doc: it claimed "type guard" but the function returns a plain boolean

Two behaviors that freeze at 1.x

Both are deliberate and documented. Flagging them here so they get a look now rather than in an issue later:

  1. parseProblemDetails throws TypeError on a Response. A Response is a non-null, non-array object with no enumerable own keys, so it would otherwise parse silently to an empty object. The error points callers at parseProblemDetailsResponse.
  2. parseProblemDetailsResponse parses any JSON body without checking the content type. Detection belongs to isProblemDetailsResponse, so the pair composes without checking twice.

@github-actions github-actions Bot added the http label Aug 1, 2026
@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.03%. Comparing base (cdb83c6) to head (b1af76f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7270      +/-   ##
==========================================
- Coverage   95.03%   95.03%   -0.01%     
==========================================
  Files         618      617       -1     
  Lines       51596    51593       -3     
  Branches     9340     9340              
==========================================
- Hits        49035    49031       -4     
  Misses       2021     2021              
- Partials      540      541       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant