Skip to content
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

Incorrect error code in @oasisprotocol/client-rt #1938

Open
lukaw3d opened this issue Aug 20, 2024 · 3 comments
Open

Incorrect error code in @oasisprotocol/client-rt #1938

lukaw3d opened this issue Aug 20, 2024 · 3 comments

Comments

@lukaw3d
Copy link
Member

lukaw3d commented Aug 20, 2024

I don't think anyone uses this, so not important in that way. But if this is auto-generated code, then something bigger broke

export const ERROR_FORBIDDEN_CODE = 7;
export const ERROR_REVERTED_CODE = 8;
export const ERROR_SIMULATION_TOO_EXPENSIVE = 8;

duplicates error code 8

Probably the source of these codes:

#[error("forbidden by policy")]
#[sdk_error(code = 7)]
Forbidden,
#[error("reverted: {0}")]
#[sdk_error(code = 8)]
Reverted(String),
#[error("forbidden by policy: this node only allows simulating calls that use up to {0} gas")]
#[sdk_error(code = 9)]
SimulationTooExpensive(u64),
#[error("invalid signed simulate call query: {0}")]
#[sdk_error(code = 10)]
InvalidSignedSimulateCall(&'static str),

@lukaw3d
Copy link
Member Author

lukaw3d commented Aug 20, 2024

@pro-wh do you know if this is autogenerated?

@pro-wh
Copy link
Contributor

pro-wh commented Aug 21, 2024

don't have autogeneration for rust to typescript. gotta update these manually

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

No branches or pull requests

2 participants