Skip to content

fix(plugins): prevent 500 on /meta/plugins/group-undefined.svg#4873

Open
vfanucci wants to merge 1 commit into
mainfrom
seo/fix-500-group-undefined-svg
Open

fix(plugins): prevent 500 on /meta/plugins/group-undefined.svg#4873
vfanucci wants to merge 1 commit into
mainfrom
seo/fix-500-group-undefined-svg

Conversation

@vfanucci

Copy link
Copy Markdown
Contributor

Summary

  • Fallback to the default plugin OG image (/meta/plugins/{pluginType ?? pluginName}.svg) when the subgroup lookup returns no match, so group-undefined.svg is never emitted into pages.
  • Harden the SSR route src/pages/meta/plugins/group-[cls].svg.ts to return 404 instead of crashing the worker when the cls param is missing/literal "undefined", when the metadata API fails, or when no title is returned.

Context

https://kestra.io/meta/plugins/group-undefined.svg was returning a 500. Root cause: in buildPluginPageProps.ts, the OG image URL was built with optional chaining on the subgroup lookup, so when no match was found the URL became literally group-undefined.svg. The route handler then called the metadata API with cls=undefined, the response had no title, and the unhandled access crashed the Cloudflare worker.

Test plan

  • Visit a plugin page that previously generated the bad URL — confirm the <meta property="og:image"> now points to the default plugin OG image
  • Hit /meta/plugins/group-undefined.svg directly — expect 404, not 500
  • Hit a valid /meta/plugins/group-{validCls}.svg — expect the SVG to render as before

🤖 Generated with Claude Code

Fallback to the default plugin OG image when the subgroup lookup
returns no match, and harden the SVG route to return 404 instead
of crashing when the param is missing or the metadata API fails.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vfanucci

Copy link
Copy Markdown
Contributor Author

Hello @fdelbrayelle , I don't know if it'a frontor plugins issue, but the /meta/plugins/group-undefined.svg returns a 500. The crawler hit it a lot (339 hits over the last month)

Looks like a fallback icon for plugin groups that aren't matched

@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

☁️ Cloudflare Worker Preview Deployed!

🔗 https://ks-seo-fix-500-group-undefined-sv-docs.kestra-io.workers.dev
🔗 https://730b5e90-docs.kestra-io.workers.dev

## 🔦 Lighthouse Benchmark

Tested: https://ks-seo-fix-500-group-undefined-sv-docs.kestra-io.workers.dev on 2026-05-27 08:09 UTC
No baseline available — scores will appear after the first merge to main

Scores (0–100, higher is better)

Page Performance Accessibility Best Practices SEO
Home 80 82 56 92
Pricing 98 91 56 100
Enterprise 98 82 56 100
Cloud 91 86 56 100
About Us 84 91 56 100
Docs Landing 93 88 56 92
Contribute to Kestra (simple docs) 98 87 56 92
Flow (full featured docs) 94 90 56 92
Blog Index 75 90 56 100
Blog Post (sample) 99 87 56 100
VS Page (sample) 97 88 56 100
Plugins Landing 92 80 56 92
Plugin Page (sample) 0 87 0 100
Plugin Debug Page (sample) 95 87 56 100
Plugin Debug Return Page (sample) 92 87 59 100
Blueprints Landing 91 80 56 92
Blueprint Audit Logs CSV Export 70 86 56 100

Core Web Vitals (lower is better)

Page LCP FCP TBT CLS Speed Index
Home 1.55 s 0.69 s 278 ms 0.002 1.86 s
Pricing 1.00 s 0.62 s 22 ms 0.000 0.90 s
Enterprise 1.12 s 0.59 s 17 ms 0.003 0.75 s
Cloud 1.90 s 0.49 s 32 ms 0.000 0.91 s
About Us 2.91 s 0.63 s 29 ms 0.000 0.91 s
Docs Landing 1.38 s 0.52 s 107 ms 0.000 1.44 s
Contribute to Kestra (simple docs) 1.12 s 0.58 s 35 ms 0.000 0.87 s
Flow (full featured docs) 0.92 s 0.53 s 162 ms 0.001 1.26 s
Blog Index 2.39 s 1.17 s 70 ms 0.001 51.08 s
Blog Post (sample) 0.96 s 0.55 s 8 ms 0.028 0.84 s
VS Page (sample) 1.13 s 0.57 s 22 ms 0.064 0.74 s
Plugins Landing 1.13 s 0.56 s 44 ms 0.000 2.42 s
Plugin Page (sample) 0.00 s 0.00 s 0 ms 0.000 0.00 s
Plugin Debug Page (sample) 0.96 s 0.58 s 116 ms 0.018 1.65 s
Plugin Debug Return Page (sample) 1.17 s 0.61 s 98 ms 0.025 2.19 s
Blueprints Landing 1.56 s 0.75 s 20 ms 0.000 1.82 s
Blueprint Audit Logs CSV Export 1.23 s 0.59 s 135 ms 0.485 2.07 s
Legend

🟢 improved  ·  🔻 regressed  ·  (blank) no significant change
Score threshold: ±10 pts  ·  Metric threshold: ±30% of baseline

@fdelbrayelle

Copy link
Copy Markdown
Member

Hi @vfanucci 👋 Let's add @Piyush-r-bhaskar and @RemiBarthe also as reviewers to be sure :)

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