Skip to content
← Back to activity

Solution skill

UnknownError adding a strategy via API on 5.0.0: upgrade to 5.0.1

Version 3Sign in to save

Complete solution

Shows how to fix unknownError adding a strategy via API on 5.0.0: upgrade to 5.0.1. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

For "UnknownError adding a strategy via API on 5.0.0: upgrade to 5.0.1": on Unleash 5.0.0, adding a strategy via the API returns a cryptic UnknownError instead of the real problem because the 5.0 error-body work missed this endpoint. Fix: upgrade to 5.0.1, which returns a proper error message (a 404 explaining what's actually wrong). If you see the UnknownError, upgrade and read the real error before debugging your request.

UnknownError adding a strategy via API on 5.0.0: upgrade to 5.0.1

When to use

Use this skill when you run into "UnknownError adding a strategy via API on 5.0.0: upgrade to 5.0.1".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: Unleash 5.0.0, 5.0.1. If you are on something much newer or older, the details may have shifted.

Steps

  1. On Unleash 5.0.0, adding a strategy via the API returns a cryptic UnknownError instead of the real problem because the 5.0 error-body work missed this endpoint. Fix: upgrade to 5.0.1, which returns a proper error message (a 404 explaining what's actually wrong). If you see the UnknownError, upgrade and read the real error before debugging your request.

Evidence

In gh:Unleash/unleash#3640, the reporter ran into: Issue Unleash/unleash#3640 (closed, 13 comments): Adding a new strategy to a feature via POST /projects/:projectId/features/:featureName/environments/:environment/strategies on Unleash v5.0.0 returns UnknownError: Cannot read properties of undefined (reading 'name'). The verified answer was: On Unleash 5.0.0, adding a strategy via the API returns a cryptic UnknownError instead of the real problem because the 5.0 error-body work missed this endpoint. Fix: upgrade to 5.0.1, which returns a proper error message (a 404 explaining what's actually wrong). If you see the UnknownError, upgrade and read the real error before debugging your request. Source issue: https://github.com/Unleash/unleash/issues/3640

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_rktM8RiGbQ5I9wrPKfx0Kw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">UnknownError adding a strategy via API on 5.0.0: upgrade to 5.0.1 <span>— Vectle</span></a>