Skip to content

fix: don't abort init when board fetch fails on Jira Cloud - #21

Merged
rethab merged 1 commit into
mainfrom
fix/issue-1001
Jul 12, 2026
Merged

fix: don't abort init when board fetch fails on Jira Cloud#21
rethab merged 1 commit into
mainfrom
fix/issue-1001

Conversation

@rethab

@rethab rethab commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Jira Cloud can return a 500 Internal Server Error (instead of an empty list) when jira init fetches boards for a project that doesn't support Jira Software boards, e.g. a Business/JWM project. This is a known quirk on Jira's side, not something the CLI can fix server-side.

The existing code in getBoardSuggestions already handles the "no boards available" case gracefully for local/on-prem installs by falling back to a "None" board option (added to handle installs without the agile add-on returning 404), but for Cloud it special-cased the error and aborted init entirely, leaving the user unable to finish setup at all.

This change drops the Cloud-specific hard-fail and applies the same fallback used for local instances: if the board fetch fails, skip it and offer "None" as the board choice. The fallback is no longer silent: a warning including the response status (e.g. 500 Internal Server Error) is printed so users can tell why only "None" is offered. This is safe because credentials and server details are already validated earlier in the init flow via Me(), so a failed board fetch at this point reflects the project/board API, not auth.

Addresses ankitpokhrel#1001.

Jira Cloud can return a 500 (instead of an empty list) when fetching
boards for a project that doesn't support Jira Software boards, e.g.
a Business/JWM project. `jira init` already treats "no boards
available" as a normal case for local/server installs by falling
back to a "None" option, but hard-aborted for Cloud instead. Apply
the same graceful fallback for Cloud, since credentials are already
verified earlier in the init flow via `Me()`.
@rethab
rethab merged commit 6150b81 into main Jul 12, 2026
1 check passed
@rethab
rethab deleted the fix/issue-1001 branch July 12, 2026 06:32
rethab added a commit that referenced this pull request Aug 5, 2026
Jira Cloud can return a 500 Internal Server Error (instead of an empty
list) when `jira init` fetches boards for a project that doesn't support
Jira Software boards, e.g. a Business/JWM project. This is a known quirk
on Jira's side, not something the CLI can fix server-side.

The existing code in `getBoardSuggestions` already handles the "no
boards available" case gracefully for local/on-prem installs by falling
back to a "None" board option (added to handle installs without the
agile add-on returning 404), but for Cloud it special-cased the error
and aborted `init` entirely, leaving the user unable to finish setup at
all.

This change drops the Cloud-specific hard-fail and applies the same
fallback used for local instances: if the board fetch fails, skip it and
offer "None" as the board choice. The fallback is no longer silent: a
warning including the response status (e.g. `500 Internal Server Error`)
is printed so users can tell why only "None" is offered. This is safe
because credentials and server details are already validated earlier in
the init flow via `Me()`, so a failed board fetch at this point reflects
the project/board API, not auth.

Addresses ankitpokhrel#1001.
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.

1 participant