Skip to content

added error message for the migration#2957

Open
ArnabChatterjee20k wants to merge 1 commit intomainfrom
migration-error-better-message
Open

added error message for the migration#2957
ArnabChatterjee20k wants to merge 1 commit intomainfrom
migration-error-better-message

Conversation

@ArnabChatterjee20k
Copy link
Copy Markdown
Member

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 6, 2026

Greptile Summary

This PR adds a errorMessage variable to surface raw API error messages when a migration report fetch fails, wiring the caught exception's message property through to the error alert.

  • A new errorMessage state is captured in the catch block using a guarded type-check (typeof e === 'object' && e !== null && 'message' in e && typeof e.message === 'string').
  • In the template, {#if errorMessage} now takes first priority, which completely bypasses both the provider- and cloud-specific static messages that give users actionable guidance ("double-check your credentials" / "API key may have expired").
  • Any non-empty raw error string — including generic network messages like "Failed to fetch" — will replace the helpful guidance, degrading the user experience on the most common error paths.

Confidence Score: 4/5

The PR is safe to merge but the core logic change degrades UX in the error path by replacing actionable guidance with raw error strings.

A P1 logic issue exists: the raw error message silently suppresses the more helpful migrationType-specific static messages, which is a present UX defect on the error path.

src/routes/(console)/(migration-wizard)/resource-form.svelte — the template error branch logic needs adjustment so the raw message supplements rather than replaces the static guidance.

Important Files Changed

Filename Overview
src/routes/(console)/(migration-wizard)/resource-form.svelte Adds dynamic error message from caught exception, but raw message overrides helpful user-facing guidance when set

Comments Outside Diff (1)

  1. src/routes/(console)/(migration-wizard)/resource-form.svelte, line 149-160 (link)

    P1 Raw error message silently suppresses user-facing guidance

    When errorMessage is non-empty, the template skips both migrationType-specific messages that give users actionable recovery steps. A low-level error like "Failed to fetch", "Network request failed", or an opaque internal server string will be displayed in their place, leaving users without the guidance they need.

    The raw message should supplement the static guidance rather than replace it:

Reviews (1): Last reviewed commit: "added error message for the migration" | Re-trigger Greptile

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