Skip to content

[BUG] [v1.1.0] ProfileManager: handleImport lacks exception handling around importProfile #38504

@hindshi-goi

Description

@hindshi-goi

Project

ide

Description

handleImport calls await importProfile(text) without a surrounding try/catch. Unlike handleFileImport, which wraps async import logic in try/catch and sets a user-facing error, this path can throw and escape the handler.
If importProfile rejects (e.g., unexpected runtime/network/storage error), the promise rejection is unhandled and the user receives no structured feedback via setError(...).

Error Message

Debug Logs

System Information

OS: Ubuntu
Bounty Challenge: v1.1.0

Screenshots

3.webm

Steps to Reproduce

Open Profile Manager → Import dialog.
Trigger handleImport with valid-looking text while forcing importProfile to throw/reject.
Observe no setError(...) path catches the exception for this flow.
Import dialog remains without proper error messaging; rejection appears in console/runtime as unhandled.

Expected Behavior

handleImport should catch exceptions and report them through setError(...), consistent with file-import behavior.

Actual Behavior

Thrown/rejected errors from importProfile(text) in handleImport are not caught in this function.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already existsideIssues related to IDE

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions