The contract's error for this refusal.
(&self)
| 211 | impl GrantError { |
| 212 | /// The contract's error for this refusal. |
| 213 | pub fn status(&self) -> Status { |
| 214 | let code = match self { |
| 215 | Self::Unknown | Self::Expired(_) => ErrorCode::Unauthorized, |
| 216 | Self::NoTokenForView(_) => ErrorCode::SandboxToken, |
| 217 | Self::InvalidTtl | Self::InvalidCapabilities(_) => ErrorCode::InvalidArgument, |
| 218 | Self::Store(_) => ErrorCode::Internal, |
| 219 | }; |
| 220 | domain_status(code, self.to_string()) |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | /// The deadline a TTL of `ttl_secs` from `now` means, or |