-
Notifications
You must be signed in to change notification settings - Fork 319
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
chore(boundary): add candid error types and unit tests for rate-limit canister #2746
base: master
Are you sure you want to change the base?
Conversation
d6736d2
to
5d8ffb2
Compare
5d8ffb2
to
4d14857
Compare
4d14857
to
743b393
Compare
ee99041
to
6b0a377
Compare
6b0a377
to
fae7e53
Compare
|
||
#[derive(CandidType, Deserialize, Debug, Clone)] | ||
pub enum DiscloseRulesArg { | ||
RuleIds(Vec<RuleId>), | ||
IncidentIds(Vec<IncidentId>), | ||
} | ||
|
||
#[derive(CandidType, Debug, Deserialize)] | ||
pub enum GetConfigError { |
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.
Do we really need all these errors separately? Maybe just combine in a single enum?
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.
GetRulesByIncidentIdError
and GetRuleByIdError
could indeed be combined to avoid some overhead, but GetConfigError
has different variant. My rationale to keep errors separate was for better clarify and for potential forward compatibility. This would ensure we could more easily extend/modify candid errors in the future, if we need to.
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.
this was also a recommendation from the nns
folks - better keep definitions separate and as flexible as possible for the potential future changes
No description provided.