fix(plugins): prevent 500 on /meta/plugins/group-undefined.svg#4873
Open
vfanucci wants to merge 1 commit into
Open
fix(plugins): prevent 500 on /meta/plugins/group-undefined.svg#4873vfanucci wants to merge 1 commit into
vfanucci wants to merge 1 commit into
Conversation
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>
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 |
Contributor
☁️ Cloudflare Worker Preview Deployed!🔗 https://ks-seo-fix-500-group-undefined-sv-docs.kestra-io.workers.dev ## 🔦 Lighthouse Benchmark
Scores (0–100, higher is better)
Core Web Vitals (lower is better)
Legend🟢 improved · 🔻 regressed · (blank) no significant change |
Member
|
Hi @vfanucci 👋 Let's add @Piyush-r-bhaskar and @RemiBarthe also as reviewers to be sure :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/meta/plugins/{pluginType ?? pluginName}.svg) when the subgroup lookup returns no match, sogroup-undefined.svgis never emitted into pages.src/pages/meta/plugins/group-[cls].svg.tsto return404instead of crashing the worker when theclsparam is missing/literal"undefined", when the metadata API fails, or when notitleis returned.Context
https://kestra.io/meta/plugins/group-undefined.svgwas 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 literallygroup-undefined.svg. The route handler then called the metadata API withcls=undefined, the response had notitle, and the unhandled access crashed the Cloudflare worker.Test plan
<meta property="og:image">now points to the default plugin OG image/meta/plugins/group-undefined.svgdirectly — expect404, not500/meta/plugins/group-{validCls}.svg— expect the SVG to render as before🤖 Generated with Claude Code