-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: surface descriptive session key errors #718
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This is a draft version: it uses |
} | ||
const data = og.encodeExecuteWithSessionKey({ args }); | ||
const sessionKeyPluginAddress = | ||
SessionKeyPlugin.meta.addresses[client.chain.id]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As with other uses of this plugin address lookup, we should probably be using a default address if the chain id is unknown.
b4b1cf9
to
484c6c8
Compare
484c6c8
to
f35148f
Compare
"./debug-session-key-bytecode.js" | ||
); | ||
const updatedOverrides: UserOperationOverrides<TEntryPointVersion> = { | ||
...(overrides as UserOperationOverrides<TEntryPointVersion>), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find a way to get this to work without the cast on this line.
oh odd.. we should update the
|
ah also, can we change the base branch to v4.x.x |
The session key plugin throws opaque errors when permission checks fail. Surface better errors in the SDK after a validation failure by using state overrides to replace the session key code with a version that produces descriptive errors.
f35148f
to
5d1065a
Compare
@moldy530 Done and done! I changed the |
The session key plugin throws opaque errors when permission checks fail. Surface better errors in the SDK after a validation failure by using state overrides to replace the session key code with a version that produces descriptive errors.
The session key plugin throws opaque errors when permission checks fail. Surface better errors in the SDK after a validation failure by using state overrides to replace the session key code with a version that produces descriptive errors.
The session key plugin throws opaque errors when permission checks fail. Surface better errors in the SDK after a validation failure by using state overrides to replace the session key code with a version that produces descriptive errors.
The session key plugin throws opaque errors when permission checks fail. Surface better errors in the SDK after a validation failure by using state overrides to replace the session key code with a version that produces descriptive errors.
The session key plugin throws opaque errors when permission checks fail. Surface better errors in the SDK after a validation failure by using state overrides to replace the session key code with a version that produces descriptive errors.
The session key plugin throws opaque errors when permission checks fail. Surface better errors in the SDK after a validation failure by using state overrides to replace the session key code with a version that produces descriptive errors.
The session key plugin throws opaque errors when permission checks fail. Surface better errors in the SDK after a validation failure by using state overrides to replace the session key code with a version that produces descriptive errors.
PR-Codex overview
This PR updates the
sessionKeyPluginActions
in theextension.ts
file to improve error handling and permissions checks.Detailed summary
executeWithSessionKey
function for descriptive errorsfixedExecuteWithSessionKey
for improved error handlinggetRpcErrorMessageFromViemError
functionSessionKeyPermissionError
classDEBUG_SESSION_KEY_BYTECODE
in a separate file