-
Notifications
You must be signed in to change notification settings - Fork 644
Closed
Labels
area-capabilitiesRelated to the kinds of things that snaps are able to do.Related to the kinds of things that snaps are able to do.type-enhancementNew feature or requestNew feature or requesttype-researchA research task.A research task.
Description
Currently, when you throw an error in the onRpcRequest handler for example, the entire Snap will crash.
export const onRpcRequest = (...) => {
// ...
throw new Error('Invalid parameters.');
};This is problematic when there are multiple requests happening at the same time, because all requests will be canceled.
We should add a way for a Snap to throw an error while not causing the entire Snap to crash, but rather respond with an error to the specific RPC request.
Metadata
Metadata
Assignees
Labels
area-capabilitiesRelated to the kinds of things that snaps are able to do.Related to the kinds of things that snaps are able to do.type-enhancementNew feature or requestNew feature or requesttype-researchA research task.A research task.