Skip to content

fix(permalink): return 404 instead of 500 for an invalid dashboard permalink key - #46332

Merged
sadpandajoe merged 2 commits into
apache:masterfrom
luizotavio32:fix/dashboard-permalink-invalid-key-404
Nov 19, 2026
Merged

sadpandajoe merged 2 commits into
apache:masterfrom
luizotavio32:fix/dashboard-permalink-invalid-key-404

Conversation

@luizotavio32

Copy link
Copy Markdown
Contributor

SUMMARY

Requesting a dashboard permalink with a key that can't be decoded (e.g. GET /api/v1/dashboard/permalink/undefined) returns a 500 and logs an ERROR with a full traceback. A malformed key is a client error, and other permalink entry points already treat it as not found.

This change returns 404 for an invalid key, while genuine failures reading the stored value (e.g. database errors) still return 500. Other callers of the permalink lookup are unaffected.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

New unit and integration tests added.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

🤖 Generated with Claude Code

…rmalink key

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

CodeAnt  CodeAnt PR Risk

🟢  Low Risk

  • The PR appears safe to merge; no actionable issues were identified in the review.

Assessed commit: ee624b64aa73

@github-actions github-actions Bot added the api Related to the REST API label Nov 18, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.47%. Comparing base (d9aeb2c) to head (3aa6615).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #46332   +/-   ##
=======================================
  Coverage   85.47%   85.47%           
=======================================
  Files        3102     3102           
  Lines      213946   213951    +5     
  Branches    50537    50537           
=======================================
+ Hits       182862   182870    +8     
+ Misses      27657    27654    -3     
  Partials     3427     3427           
Flag Coverage Δ
hive 34.00% <62.50%> (+<0.01%) ⬆️
mysql 51.67% <100.00%> (+<0.01%) ⬆️
postgres 51.70% <100.00%> (+<0.01%) ⬆️
presto 35.69% <62.50%> (+<0.01%) ⬆️
python 88.22% <100.00%> (+<0.01%) ⬆️
sqlite 51.38% <100.00%> (+<0.01%) ⬆️
unit 83.42% <87.50%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@sadpandajoe
sadpandajoe merged commit 8f6df58 into apache:master Nov 19, 2026
72 checks passed
hainenber pushed a commit that referenced this pull request Nov 21, 2026
…rmalink key (#46332)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
luizotavio32 added a commit to luizotavio32/superset that referenced this pull request Nov 24, 2026
…rmalink key (apache#46332)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 8f6df58)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Related to the REST API size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants