1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
use std::error;
use std::fmt;
use std::io;
use std::mem;
use std::result;
use std::str::Utf8Error;
use std::string::FromUtf8Error;
use kudu_pb::master::{
MasterErrorPB,
MasterErrorPB_Code as MasterErrorCodePB,
};
use kudu_pb::rpc_header::{
ErrorStatusPB as RpcErrorPB,
ErrorStatusPB_RpcErrorCodePB as RpcErrorCodePB
};
use kudu_pb::tserver::{
TabletServerErrorPB,
TabletServerErrorPB_Code as TabletServerErrorCodePB,
};
use kudu_pb::wire_protocol::{
AppStatusPB as StatusPB,
AppStatusPB_ErrorCode as StatusCodePB,
};
use protobuf::ProtobufError;
pub type Result<T> = result::Result<T, Error>;
#[derive(Debug)]
pub enum Error {
InvalidArgument(String),
Rpc(RpcError),
Master(MasterError),
TabletServer(TabletServerError),
Io(io::Error),
Serialization(String),
VersionMismatch(String),
Backoff,
TimedOut,
Cancelled,
ConnectionError,
NegotiationError(&'static str),
NoRangePartition,
}
impl Error {
pub fn is_network_error(&self) -> bool {
match *self {
Error::Io(_) | Error::ConnectionError => true,
_ => false,
}
}
}
impl Clone for Error {
fn clone(&self) -> Error {
match *self {
Error::InvalidArgument(ref error) => Error::InvalidArgument(error.clone()),
Error::Rpc(ref error) => Error::Rpc(error.clone()),
Error::Master(ref error) => Error::Master(error.clone()),
Error::TabletServer(ref error) => Error::TabletServer(error.clone()),
Error::Io(ref error) => {
Error::Io(io::Error::from_raw_os_error(error.raw_os_error().unwrap()))
},
Error::Serialization(ref error) => Error::Serialization(error.clone()),
Error::VersionMismatch(ref error) => Error::VersionMismatch(error.clone()),
Error::Backoff => Error::Backoff,
Error::TimedOut => Error::TimedOut,
Error::Cancelled => Error::Cancelled,
Error::ConnectionError => Error::ConnectionError,
Error::NegotiationError(error) => Error::NegotiationError(error),
Error::NoRangePartition => Error::NoRangePartition,
}
}
}
impl PartialEq for Error {
fn eq(&self, other: &Error) -> bool {
match (self, other) {
(&Error::InvalidArgument(ref a), &Error::InvalidArgument(ref b)) => a == b,
(&Error::Rpc(ref a), &Error::Rpc(ref b)) => a == b,
(&Error::Master(ref a), &Error::Master(ref b)) => a == b,
(&Error::TabletServer(ref a), &Error::TabletServer(ref b)) => a == b,
(&Error::Io(ref a), &Error::Io(ref b)) => a.raw_os_error().unwrap() == b.raw_os_error().unwrap(),
(&Error::Serialization(ref a), &Error::Serialization(ref b)) => a == b,
(&Error::VersionMismatch(ref a), &Error::VersionMismatch(ref b)) => a == b,
(&Error::Backoff, &Error::Backoff) => true,
(&Error::TimedOut, &Error::TimedOut) => true,
(&Error::Cancelled, &Error::Cancelled) => true,
(&Error::ConnectionError, &Error::ConnectionError) => true,
(&Error::NegotiationError(ref a), &Error::NegotiationError(ref b)) => a == b,
(&Error::NoRangePartition, &Error::NoRangePartition) => true,
_ => false,
}
}
}
impl error::Error for Error {
fn description(&self) -> &str {
match *self {
Error::InvalidArgument(_) => "illegal argument",
Error::Rpc(ref error) => error.description(),
Error::Master(ref error) => error.description(),
Error::TabletServer(ref error) => error.description(),
Error::Io(ref error) => error.description(),
Error::Serialization(ref description) => description,
Error::VersionMismatch(ref description) => description,
Error::Backoff => "backoff",
Error::TimedOut => "operation timed out",
Error::Cancelled => "operation cancelled",
Error::ConnectionError => "connection error",
Error::NegotiationError(error) => error,
Error::NoRangePartition => "no range partition",
}
}
fn cause(&self) -> Option<&error::Error> {
match *self {
Error::InvalidArgument(_) => None,
Error::Rpc(ref error) => error.cause(),
Error::Master(ref error) => error.cause(),
Error::TabletServer(ref error) => error.cause(),
Error::Io(ref error) => error.cause(),
Error::Serialization(_) => None,
Error::VersionMismatch(_) => None,
Error::Backoff => None,
Error::TimedOut => None,
Error::Cancelled => None,
Error::ConnectionError => None,
Error::NegotiationError(_) => None,
Error::NoRangePartition => None,
}
}
}
impl From<RpcError> for Error {
fn from(error: RpcError) -> Error {
Error::Rpc(error)
}
}
impl From<MasterError> for Error {
fn from(error: MasterError) -> Error {
Error::Master(error)
}
}
impl From<TabletServerError> for Error {
fn from(error: TabletServerError) -> Error {
Error::TabletServer(error)
}
}
impl From<io::Error> for Error {
fn from(error: io::Error) -> Error {
Error::Io(error)
}
}
impl From<ProtobufError> for Error {
fn from(error: ProtobufError) -> Error {
match error {
ProtobufError::IoError(error) => Error::Io(error),
ProtobufError::WireError(msg) => Error::Serialization(msg),
ProtobufError::MessageNotInitialized { message } =>
panic!("Protobuf message not initialized: {}", message),
}
}
}
impl From<Utf8Error> for Error {
fn from(error: Utf8Error) -> Error {
Error::Serialization(error.to_string())
}
}
impl From<FromUtf8Error> for Error {
fn from(error: FromUtf8Error) -> Error {
Error::Serialization(error.to_string())
}
}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Debug::fmt(self, f)
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum RpcErrorCode {
ApplicationError,
NoSuchMethod,
NoSuchService,
ServerTooBusy,
InvalidRequest,
StaleRequest,
FatalUnknown,
FatalServerShuttingDown,
FatalInvalidRpcHeader,
FatalDeserializingRequest,
FatalVersionMismatch,
FatalUnauthorized,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct RpcError {
code: RpcErrorCode,
message: String,
unsupported_feature_flags: Vec<u32>,
}
impl RpcError {
pub fn invalid_rpc_header(message: String) -> RpcError {
RpcError {
code: RpcErrorCode::FatalInvalidRpcHeader,
message: message,
unsupported_feature_flags: Vec::new(),
}
}
pub fn is_fatal(&self) -> bool {
match self.code {
RpcErrorCode::FatalUnknown |
RpcErrorCode::FatalServerShuttingDown |
RpcErrorCode::FatalInvalidRpcHeader |
RpcErrorCode::FatalDeserializingRequest |
RpcErrorCode::FatalVersionMismatch |
RpcErrorCode::FatalUnauthorized => true,
_ => false,
}
}
}
impl error::Error for RpcError {
fn description(&self) -> &str {
match self.code {
RpcErrorCode::ApplicationError => "application error",
RpcErrorCode::NoSuchMethod => "no such method",
RpcErrorCode::NoSuchService => "no such service",
RpcErrorCode::ServerTooBusy => "server too busy",
RpcErrorCode::InvalidRequest => "invalid request",
RpcErrorCode::FatalUnknown => "unknown error",
RpcErrorCode::StaleRequest => "stale request",
RpcErrorCode::FatalServerShuttingDown => "server shutting down",
RpcErrorCode::FatalInvalidRpcHeader => "invalid RPC header",
RpcErrorCode::FatalDeserializingRequest => "error deserializing request",
RpcErrorCode::FatalVersionMismatch => "version mismatch",
RpcErrorCode::FatalUnauthorized => "unauthorized",
}
}
fn cause(&self) -> Option<&error::Error> {
None
}
}
impl From<RpcErrorPB> for RpcError {
fn from(mut error: RpcErrorPB) -> RpcError {
let code = match error.get_code() {
RpcErrorCodePB::FATAL_UNKNOWN => RpcErrorCode::FatalUnknown,
RpcErrorCodePB::ERROR_APPLICATION => RpcErrorCode::ApplicationError,
RpcErrorCodePB::ERROR_NO_SUCH_METHOD => RpcErrorCode::NoSuchMethod,
RpcErrorCodePB::ERROR_NO_SUCH_SERVICE => RpcErrorCode::NoSuchService,
RpcErrorCodePB::ERROR_SERVER_TOO_BUSY => RpcErrorCode::ServerTooBusy,
RpcErrorCodePB::ERROR_INVALID_REQUEST => RpcErrorCode::InvalidRequest,
RpcErrorCodePB::ERROR_REQUEST_STALE => RpcErrorCode::StaleRequest,
RpcErrorCodePB::FATAL_SERVER_SHUTTING_DOWN => RpcErrorCode::FatalServerShuttingDown,
RpcErrorCodePB::FATAL_INVALID_RPC_HEADER => RpcErrorCode::FatalInvalidRpcHeader,
RpcErrorCodePB::FATAL_DESERIALIZING_REQUEST => RpcErrorCode::FatalDeserializingRequest,
RpcErrorCodePB::FATAL_VERSION_MISMATCH => RpcErrorCode::FatalVersionMismatch,
RpcErrorCodePB::FATAL_UNAUTHORIZED => RpcErrorCode::FatalUnauthorized,
};
let message = mem::replace(error.mut_message(), String::new());
let unsupported_feature_flags = mem::replace(error.mut_unsupported_feature_flags(), Vec::new());
RpcError {
code: code,
message: message,
unsupported_feature_flags: unsupported_feature_flags,
}
}
}
impl fmt::Display for RpcError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Debug::fmt(self, f)
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum StatusCode {
UnknownError,
NotFound,
Corruption,
NotSupported,
InvalidArgument,
IoError,
AlreadyPresent,
RuntimeError,
NetworkError,
IllegalState,
NotAuthorized,
Aborted,
RemoteError,
ServiceUnavailable,
TimedOut,
Uninitialized,
ConfigurationError,
Incomplete,
EndOfFile,
}
impl From<StatusCodePB> for StatusCode {
fn from(code: StatusCodePB) -> StatusCode {
match code {
StatusCodePB::UNKNOWN_ERROR => StatusCode::UnknownError,
StatusCodePB::OK => unreachable!("shouldn't be accessing an OK status"),
StatusCodePB::NOT_FOUND => StatusCode::NotFound,
StatusCodePB::CORRUPTION => StatusCode::Corruption,
StatusCodePB::NOT_SUPPORTED => StatusCode::NotSupported,
StatusCodePB::INVALID_ARGUMENT => StatusCode::InvalidArgument,
StatusCodePB::IO_ERROR => StatusCode::IoError,
StatusCodePB::ALREADY_PRESENT => StatusCode::AlreadyPresent,
StatusCodePB::RUNTIME_ERROR => StatusCode::RuntimeError,
StatusCodePB::NETWORK_ERROR => StatusCode::NetworkError,
StatusCodePB::ILLEGAL_STATE => StatusCode::IllegalState,
StatusCodePB::NOT_AUTHORIZED => StatusCode::NotAuthorized,
StatusCodePB::ABORTED => StatusCode::Aborted,
StatusCodePB::REMOTE_ERROR => StatusCode::RemoteError,
StatusCodePB::SERVICE_UNAVAILABLE => StatusCode::ServiceUnavailable,
StatusCodePB::TIMED_OUT => StatusCode::TimedOut,
StatusCodePB::UNINITIALIZED => StatusCode::Uninitialized,
StatusCodePB::CONFIGURATION_ERROR => StatusCode::ConfigurationError,
StatusCodePB::INCOMPLETE => StatusCode::Incomplete,
StatusCodePB::END_OF_FILE => StatusCode::EndOfFile,
}
}
}
#[derive(Clone, PartialEq, Eq, Hash)]
pub struct Status {
code: StatusCode,
message: Option<String>,
posix_code: Option<i32>,
}
impl Status {
pub fn code(&self) -> StatusCode {
self.code
}
pub fn message(&self) -> Option<&str> {
self.message.as_ref().map(String::as_str)
}
pub fn posix_code(&self) -> Option<i32> {
self.posix_code
}
}
impl fmt::Debug for Status {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
try!(write!(f, "{:?}", self.code));
if let Some(code) = self.posix_code {
try!(write!(f, "({})", code));
}
if let Some(ref message) = self.message {
try!(write!(f, ": {}", message));
}
Ok(())
}
}
impl From<StatusPB> for Status {
fn from(mut status: StatusPB) -> Status {
Status {
code: StatusCode::from(status.get_code()),
message: if status.has_message() { Some(status.take_message()) } else { None },
posix_code: if status.has_posix_code() { Some(status.get_posix_code()) } else { None },
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum TabletServerErrorCode {
UnknownError,
InvalidSchema,
InvalidRowBlock,
InvalidMutation,
MismatchedSchema,
TabletNotFound,
ScannerExpired,
InvalidScanSpec,
InvalidConfig,
TabletAlreadyExists,
TabletHasANewerSchema,
TabletNotRunning,
InvalidSnapshot,
InvalidScanCallSeqId,
NotTheLeader,
WrongServerUuid,
CasFailed,
AlreadyInProgress,
Throttled,
}
impl From<TabletServerErrorCodePB> for TabletServerErrorCode {
fn from(error: TabletServerErrorCodePB) -> TabletServerErrorCode {
match error {
TabletServerErrorCodePB::UNKNOWN_ERROR => TabletServerErrorCode::UnknownError,
TabletServerErrorCodePB::INVALID_SCHEMA => TabletServerErrorCode::InvalidSchema,
TabletServerErrorCodePB::INVALID_ROW_BLOCK => TabletServerErrorCode::InvalidRowBlock,
TabletServerErrorCodePB::INVALID_MUTATION => TabletServerErrorCode::InvalidMutation,
TabletServerErrorCodePB::MISMATCHED_SCHEMA => TabletServerErrorCode::MismatchedSchema,
TabletServerErrorCodePB::TABLET_NOT_FOUND => TabletServerErrorCode::TabletNotFound,
TabletServerErrorCodePB::SCANNER_EXPIRED => TabletServerErrorCode::ScannerExpired,
TabletServerErrorCodePB::INVALID_SCAN_SPEC => TabletServerErrorCode::InvalidScanSpec,
TabletServerErrorCodePB::INVALID_CONFIG => TabletServerErrorCode::InvalidConfig,
TabletServerErrorCodePB::TABLET_ALREADY_EXISTS => TabletServerErrorCode::TabletAlreadyExists,
TabletServerErrorCodePB::TABLET_HAS_A_NEWER_SCHEMA => TabletServerErrorCode::TabletHasANewerSchema,
TabletServerErrorCodePB::TABLET_NOT_RUNNING => TabletServerErrorCode::TabletNotRunning,
TabletServerErrorCodePB::INVALID_SNAPSHOT => TabletServerErrorCode::InvalidSnapshot,
TabletServerErrorCodePB::INVALID_SCAN_CALL_SEQ_ID => TabletServerErrorCode::InvalidScanCallSeqId,
TabletServerErrorCodePB::NOT_THE_LEADER => TabletServerErrorCode::NotTheLeader,
TabletServerErrorCodePB::WRONG_SERVER_UUID => TabletServerErrorCode::WrongServerUuid,
TabletServerErrorCodePB::CAS_FAILED => TabletServerErrorCode::CasFailed,
TabletServerErrorCodePB::ALREADY_INPROGRESS => TabletServerErrorCode::AlreadyInProgress,
TabletServerErrorCodePB::THROTTLED => TabletServerErrorCode::Throttled,
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct TabletServerError {
code: TabletServerErrorCode,
status: Status,
}
impl error::Error for TabletServerError {
fn description(&self) -> &str {
match self.code {
TabletServerErrorCode::UnknownError => "unknown error",
TabletServerErrorCode::InvalidSchema => "invalid schema",
TabletServerErrorCode::InvalidRowBlock => "invalid row block",
TabletServerErrorCode::InvalidMutation => "invalid mutation",
TabletServerErrorCode::MismatchedSchema => "mismatched schema",
TabletServerErrorCode::TabletNotFound => "tablet not found",
TabletServerErrorCode::ScannerExpired => "scanner expired",
TabletServerErrorCode::InvalidScanSpec => "invalid scan spec",
TabletServerErrorCode::InvalidConfig => "invalid config",
TabletServerErrorCode::TabletAlreadyExists => "tablet already exists",
TabletServerErrorCode::TabletHasANewerSchema => "tablet has a newer schema",
TabletServerErrorCode::TabletNotRunning => "tablet not running",
TabletServerErrorCode::InvalidSnapshot => "invalid snapshot",
TabletServerErrorCode::InvalidScanCallSeqId => "invalid scan call sequence id",
TabletServerErrorCode::NotTheLeader => "not the leader",
TabletServerErrorCode::WrongServerUuid => "wrong server UUID",
TabletServerErrorCode::CasFailed => "CAS failed",
TabletServerErrorCode::AlreadyInProgress => "already in progress",
TabletServerErrorCode::Throttled => "throttled",
}
}
fn cause(&self) -> Option<&error::Error> {
None
}
}
impl fmt::Display for TabletServerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Debug::fmt(self, f)
}
}
impl From<TabletServerErrorPB> for TabletServerError {
fn from(mut error: TabletServerErrorPB) -> TabletServerError {
TabletServerError {
code: TabletServerErrorCode::from(error.get_code()),
status: Status::from(error.take_status()),
}
}
}
impl From<StatusPB> for TabletServerError {
fn from(error: StatusPB) -> TabletServerError {
TabletServerError {
code: TabletServerErrorCode::UnknownError,
status: Status::from(error),
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum MasterErrorCode {
UnknownError,
InvalidSchema,
TableNotFound,
TableAlreadyPresent,
TooManyTablets,
CatalogManagerNotInitialized,
NotTheLeader,
InvalidReplicationFactor,
TabletNotRunning,
}
impl From<MasterErrorCodePB> for MasterErrorCode {
fn from(error: MasterErrorCodePB) -> MasterErrorCode {
match error {
MasterErrorCodePB::UNKNOWN_ERROR => MasterErrorCode::UnknownError,
MasterErrorCodePB::INVALID_SCHEMA => MasterErrorCode::InvalidSchema,
MasterErrorCodePB::TABLE_NOT_FOUND => MasterErrorCode::TableNotFound,
MasterErrorCodePB::TABLE_ALREADY_PRESENT => MasterErrorCode::TableAlreadyPresent,
MasterErrorCodePB::TOO_MANY_TABLETS => MasterErrorCode::TooManyTablets,
MasterErrorCodePB::CATALOG_MANAGER_NOT_INITIALIZED => MasterErrorCode::CatalogManagerNotInitialized,
MasterErrorCodePB::NOT_THE_LEADER => MasterErrorCode::NotTheLeader,
MasterErrorCodePB::REPLICATION_FACTOR_TOO_HIGH => MasterErrorCode::InvalidReplicationFactor,
MasterErrorCodePB::TABLET_NOT_RUNNING => MasterErrorCode::TabletNotRunning,
MasterErrorCodePB::EVEN_REPLICATION_FACTOR => MasterErrorCode::InvalidReplicationFactor,
MasterErrorCodePB::ILLEGAL_REPLICATION_FACTOR => MasterErrorCode::InvalidReplicationFactor,
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct MasterError {
code: MasterErrorCode,
status: Status,
}
impl MasterError {
pub fn new(code: MasterErrorCode, status: Status) -> MasterError {
MasterError {
code: code,
status: status,
}
}
pub fn code(&self) -> MasterErrorCode {
self.code
}
pub fn status(&self) -> &Status {
&self.status
}
}
impl error::Error for MasterError {
fn description(&self) -> &str {
match self.code {
MasterErrorCode::UnknownError => "unknown error",
MasterErrorCode::InvalidSchema => "invalid schema",
MasterErrorCode::TableNotFound => "table not found",
MasterErrorCode::TableAlreadyPresent => "table already exists",
MasterErrorCode::TooManyTablets => "too many tablets",
MasterErrorCode::CatalogManagerNotInitialized => "catalog manager not initialized",
MasterErrorCode::NotTheLeader => "not the leader",
MasterErrorCode::InvalidReplicationFactor => "invalid replication factor",
MasterErrorCode::TabletNotRunning => "tablet not running",
}
}
fn cause(&self) -> Option<&error::Error> {
None
}
}
impl fmt::Display for MasterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Debug::fmt(self, f)
}
}
impl From<MasterErrorPB> for MasterError {
fn from(mut error: MasterErrorPB) -> MasterError {
MasterError {
code: MasterErrorCode::from(error.get_code()),
status: Status::from(error.take_status()),
}
}
}