Skip to content

Add error message to resource importer result#451

Open
gemammercado wants to merge 5 commits intomainfrom
resourceImporter
Open

Add error message to resource importer result#451
gemammercado wants to merge 5 commits intomainfrom
resourceImporter

Conversation

@gemammercado
Copy link
Copy Markdown
Contributor

This PR adds an error message to the resource importer result to provide more context about why the import failed.

@gemammercado gemammercado requested a review from a team as a code owner February 24, 2026 15:53
@satyakigh
Copy link
Copy Markdown
Collaborator

Is the goal here to allow some imports to fail + adding why the import failed?

@gemammercado
Copy link
Copy Markdown
Contributor Author

Is the goal here to allow some imports to fail + adding why the import failed?

The goal is to add the reason why the import failed to the message the lsp returns to the client.

public async getResource(
typeName: ResourceType,
identifier: ResourceId,
): Promise<{ resource?: ResourceState; error?: string }> {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just throw instead? with concrete Error types/classes instead of an error string to understand if something failed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes made new revision with this change

satyakigh
satyakigh previously approved these changes Mar 30, 2026
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.

3 participants