Skip to content

Conversation

@tobias-tengler
Copy link
Member

Previously Spectre.Console would attempt to parse markup characters from the exception message and it might fail with the following exception:

CleanShot 2026-01-20 at 14 15 26@2x

Now we write directly to stderr.

Copilot AI review requested due to automatic review settings January 20, 2026 13:16
@tobias-tengler tobias-tengler changed the title [Nitro] Prevent markup exception in middleware [Nitro CLI] Prevent markup exception in middleware Jan 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where Spectre.Console would attempt to parse markup characters from exception messages in the middleware exception handler, potentially causing markup parsing exceptions.

Changes:

  • Updated exception middleware to write exception messages directly to stderr without markup parsing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

🚀 Fusion Gateway Performance Results

Simple Composite Query

Constant Load (50 VUs)

Requests/sec Error Rate
5808.08 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.78ms 7.14ms 163.01ms 8.45ms 13.13ms 18.64ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
4629.76 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.73ms 39.01ms 265.51ms 47.94ms 106.65ms 124.16ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
      }
    }
  }
}

Deep Recursion Query

Constant Load (50 VUs)

Requests/sec Error Rate
268.82 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
12.81ms 173.71ms 585.76ms 180.44ms 225.49ms 250.56ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
308.25 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
3.11ms 677.66ms 1701.83ms 687.46ms 1346.77ms 1471.03ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  users {
    ...User
    reviews {
      ...Review
      product {
        ...Product
        reviews {
          ...Review
          author {
            ...User
            reviews {
              ...Review
              product {
                ...Product
              }
            }
          }
        }
      }
    }
  }
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
        reviews {
          ...Review
          product {
            ...Product
          }
        }
      }
    }
  }
}

Variable Batching Throughput

Constant Load (50 VUs)

Requests/sec Error Rate
23745.47 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 1.70ms 43.36ms 2.06ms 3.92ms 4.82ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
18636.61 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 9.24ms 108.14ms 11.32ms 23.51ms 28.28ms

Executed Query

query TestQuery_8f7a46ce_2(
  $__fusion_1_upc: ID!
  $__fusion_2_price: Long!
  $__fusion_2_weight: Long!
) {
  productByUpc(upc: $__fusion_1_upc) {
    inStock
    shippingEstimate(weight: $__fusion_2_weight, price: $__fusion_2_price)
  }
}

Variables (5 sets batched in single request)

[
  { "__fusion_1_upc": "1", "__fusion_2_price": 899, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "2", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 },
  { "__fusion_1_upc": "3", "__fusion_2_price": 15, "__fusion_2_weight": 20 },
  { "__fusion_1_upc": "4", "__fusion_2_price": 499, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "5", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 }
]

No baseline data available for comparison.


Run 21172874818 • Commit 583bc04 • Tue, 20 Jan 2026 13:34:18 GMT

@tobias-tengler tobias-tengler merged commit 6118dfb into main Jan 20, 2026
121 of 122 checks passed
@tobias-tengler tobias-tengler deleted the tte/prevent-nitro-markup-exception branch January 20, 2026 13:47
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (ca63d0a) to head (331809f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #9051   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants