pipeline/
error.rs

1// Copyright 2023 Greptime Team
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15use std::any::Any;
16
17use common_error::ext::ErrorExt;
18use common_error::status_code::StatusCode;
19use common_macro::stack_trace_debug;
20use datatypes::timestamp::TimestampNanosecond;
21use snafu::{Location, Snafu};
22
23#[derive(Snafu)]
24#[snafu(visibility(pub))]
25#[stack_trace_debug]
26pub enum Error {
27    #[snafu(display("Empty input field"))]
28    EmptyInputField {
29        #[snafu(implicit)]
30        location: Location,
31    },
32
33    #[snafu(display("Missing input field"))]
34    MissingInputField {
35        #[snafu(implicit)]
36        location: Location,
37    },
38
39    #[snafu(display(
40        "Field renaming must be a string pair of 'key' and 'rename_to', got: {value:?}"
41    ))]
42    InvalidFieldRename {
43        value: yaml_rust::Yaml,
44        #[snafu(implicit)]
45        location: Location,
46    },
47
48    #[snafu(display("Processor must be a map"))]
49    ProcessorMustBeMap {
50        #[snafu(implicit)]
51        location: Location,
52    },
53
54    #[snafu(display("Processor {processor}: missing field: {field}"))]
55    ProcessorMissingField {
56        processor: String,
57        field: String,
58        #[snafu(implicit)]
59        location: Location,
60    },
61
62    #[snafu(display("Processor {processor}: expect string value, but got {v:?}"))]
63    ProcessorExpectString {
64        processor: String,
65        v: vrl::value::Value,
66        #[snafu(implicit)]
67        location: Location,
68    },
69
70    #[snafu(display("Processor {processor}: unsupported value {val}"))]
71    ProcessorUnsupportedValue {
72        processor: String,
73        val: String,
74        #[snafu(implicit)]
75        location: Location,
76    },
77
78    #[snafu(display("Processor key must be a string"))]
79    ProcessorKeyMustBeString {
80        #[snafu(implicit)]
81        location: Location,
82    },
83
84    #[snafu(display("Processor {kind}: failed to parse {value}"))]
85    ProcessorFailedToParseString {
86        kind: String,
87        value: String,
88        #[snafu(implicit)]
89        location: Location,
90    },
91
92    #[snafu(display("Processor must have a string key"))]
93    ProcessorMustHaveStringKey {
94        #[snafu(implicit)]
95        location: Location,
96    },
97
98    #[snafu(display("Unsupported {processor} processor"))]
99    UnsupportedProcessor {
100        processor: String,
101        #[snafu(implicit)]
102        location: Location,
103    },
104
105    #[snafu(display("Field {field} must be a {ty}"))]
106    FieldMustBeType {
107        field: String,
108        ty: String,
109        #[snafu(implicit)]
110        location: Location,
111    },
112
113    #[snafu(display("Field parse from string failed: {field}"))]
114    FailedParseFieldFromString {
115        #[snafu(source)]
116        error: Box<dyn std::error::Error + Send + Sync>,
117        field: String,
118        #[snafu(implicit)]
119        location: Location,
120    },
121
122    #[snafu(display("Failed to parse {key} as int: {value}"))]
123    FailedToParseIntKey {
124        key: String,
125        value: String,
126        #[snafu(source)]
127        error: std::num::ParseIntError,
128        #[snafu(implicit)]
129        location: Location,
130    },
131
132    #[snafu(display("Failed to parse {value} to int"))]
133    FailedToParseInt {
134        value: String,
135        #[snafu(source)]
136        error: std::num::ParseIntError,
137        #[snafu(implicit)]
138        location: Location,
139    },
140    #[snafu(display("Failed to parse {key} as float: {value}"))]
141    FailedToParseFloatKey {
142        key: String,
143        value: String,
144        #[snafu(source)]
145        error: std::num::ParseFloatError,
146        #[snafu(implicit)]
147        location: Location,
148    },
149
150    #[snafu(display("Processor {kind}: {key} not found in intermediate keys"))]
151    IntermediateKeyIndex {
152        kind: String,
153        key: String,
154        #[snafu(implicit)]
155        location: Location,
156    },
157
158    #[snafu(display("Cmcd {k} missing value in {s}"))]
159    CmcdMissingValue {
160        k: String,
161        s: String,
162        #[snafu(implicit)]
163        location: Location,
164    },
165    #[snafu(display("Part: {part} missing key in {s}"))]
166    CmcdMissingKey {
167        part: String,
168        s: String,
169        #[snafu(implicit)]
170        location: Location,
171    },
172    #[snafu(display("Key must be a string, but got {k:?}"))]
173    KeyMustBeString {
174        k: yaml_rust::Yaml,
175        #[snafu(implicit)]
176        location: Location,
177    },
178
179    #[snafu(display("Csv read error"))]
180    CsvRead {
181        #[snafu(implicit)]
182        location: Location,
183        #[snafu(source)]
184        error: csv::Error,
185    },
186    #[snafu(display("Expected at least one record from csv format, but got none"))]
187    CsvNoRecord {
188        #[snafu(implicit)]
189        location: Location,
190    },
191
192    #[snafu(display("Separator '{separator}' must be a single character, but got '{value}'"))]
193    CsvSeparatorName {
194        separator: String,
195        value: String,
196        #[snafu(implicit)]
197        location: Location,
198    },
199
200    #[snafu(display("Quote '{quote}' must be a single character, but got '{value}'"))]
201    CsvQuoteName {
202        quote: String,
203        value: String,
204        #[snafu(implicit)]
205        location: Location,
206    },
207
208    #[snafu(display("Parse date timezone error {value}"))]
209    DateParseTimezone {
210        value: String,
211        #[snafu(source)]
212        error: chrono_tz::ParseError,
213        #[snafu(implicit)]
214        location: Location,
215    },
216
217    #[snafu(display("Parse date error {value}"))]
218    DateParse {
219        value: String,
220        #[snafu(source)]
221        error: chrono::ParseError,
222        #[snafu(implicit)]
223        location: Location,
224    },
225
226    #[snafu(display("Failed to get local timezone"))]
227    DateFailedToGetLocalTimezone {
228        #[snafu(implicit)]
229        location: Location,
230    },
231
232    #[snafu(display("Invalid Pattern: '{s}'. {detail}"))]
233    DissectInvalidPattern {
234        s: String,
235        detail: String,
236        #[snafu(implicit)]
237        location: Location,
238    },
239
240    #[snafu(display("Empty pattern is not allowed"))]
241    DissectEmptyPattern {
242        #[snafu(implicit)]
243        location: Location,
244    },
245    #[snafu(display("Split: '{split}' exceeds the input"))]
246    DissectSplitExceedsInput {
247        split: String,
248        #[snafu(implicit)]
249        location: Location,
250    },
251    #[snafu(display("Split: '{split}' does not match the input '{input}'"))]
252    DissectSplitNotMatchInput {
253        split: String,
254        input: String,
255        #[snafu(implicit)]
256        location: Location,
257    },
258    #[snafu(display("Consecutive names are not allowed: '{name1}' '{name2}'"))]
259    DissectConsecutiveNames {
260        name1: String,
261        name2: String,
262        #[snafu(implicit)]
263        location: Location,
264    },
265    #[snafu(display("No matching pattern found"))]
266    DissectNoMatchingPattern {
267        #[snafu(implicit)]
268        location: Location,
269    },
270    #[snafu(display("Modifier '{m}' already set, but found {modifier}"))]
271    DissectModifierAlreadySet {
272        m: String,
273        modifier: String,
274        #[snafu(implicit)]
275        location: Location,
276    },
277
278    #[snafu(display("Append Order modifier is already set to '{n}', cannot be set to {order}"))]
279    DissectAppendOrderAlreadySet {
280        n: String,
281        order: u32,
282        #[snafu(implicit)]
283        location: Location,
284    },
285    #[snafu(display("Order can only be set to Append Modifier, current modifier is {m}"))]
286    DissectOrderOnlyAppend {
287        m: String,
288        #[snafu(implicit)]
289        location: Location,
290    },
291
292    #[snafu(display("Order can only be set to Append Modifier"))]
293    DissectOrderOnlyAppendModifier {
294        #[snafu(implicit)]
295        location: Location,
296    },
297
298    #[snafu(display("End modifier already set: '{m}'"))]
299    DissectEndModifierAlreadySet {
300        m: String,
301        #[snafu(implicit)]
302        location: Location,
303    },
304    #[snafu(display("Invalid resolution: {resolution}"))]
305    EpochInvalidResolution {
306        resolution: String,
307        #[snafu(implicit)]
308        location: Location,
309    },
310    #[snafu(display("Pattern is required"))]
311    GsubPatternRequired {
312        #[snafu(implicit)]
313        location: Location,
314    },
315    #[snafu(display("Replacement is required"))]
316    GsubReplacementRequired {
317        #[snafu(implicit)]
318        location: Location,
319    },
320    #[snafu(display("Invalid regex pattern: {pattern}"))]
321    Regex {
322        #[snafu(source)]
323        error: regex::Error,
324        pattern: String,
325        #[snafu(implicit)]
326        location: Location,
327    },
328    #[snafu(display("Separator is required"))]
329    JoinSeparatorRequired {
330        #[snafu(implicit)]
331        location: Location,
332    },
333    #[snafu(display("Invalid method: {method}"))]
334    LetterInvalidMethod {
335        method: String,
336        #[snafu(implicit)]
337        location: Location,
338    },
339    #[snafu(display("No named group found in regex {origin}"))]
340    RegexNamedGroupNotFound {
341        origin: String,
342        #[snafu(implicit)]
343        location: Location,
344    },
345    #[snafu(display("No valid field found in {processor} processor"))]
346    RegexNoValidField {
347        processor: String,
348        #[snafu(implicit)]
349        location: Location,
350    },
351    #[snafu(display("No valid pattern found in {processor} processor"))]
352    RegexNoValidPattern {
353        processor: String,
354        #[snafu(implicit)]
355        location: Location,
356    },
357    #[snafu(display("Invalid method: {s}"))]
358    UrlEncodingInvalidMethod {
359        s: String,
360        #[snafu(implicit)]
361        location: Location,
362    },
363    #[snafu(display("Wrong digest pattern: {pattern}"))]
364    DigestPatternInvalid {
365        pattern: String,
366        #[snafu(implicit)]
367        location: Location,
368    },
369    #[snafu(display("Invalid transform on_failure value: {value}"))]
370    TransformOnFailureInvalidValue {
371        value: String,
372        #[snafu(implicit)]
373        location: Location,
374    },
375    #[snafu(display("Transform element must be a map"))]
376    TransformElementMustBeMap {
377        #[snafu(implicit)]
378        location: Location,
379    },
380    #[snafu(display("Transform fields must be set."))]
381    TransformFieldMustBeSet {
382        #[snafu(implicit)]
383        location: Location,
384    },
385    #[snafu(display("Transform {fields:?} type MUST BE set."))]
386    TransformTypeMustBeSet {
387        fields: String,
388        #[snafu(implicit)]
389        location: Location,
390    },
391    #[snafu(display("Column name must be unique, but got duplicated: {duplicates}"))]
392    TransformColumnNameMustBeUnique {
393        duplicates: String,
394        #[snafu(implicit)]
395        location: Location,
396    },
397    #[snafu(display(
398        "Illegal to set multiple timestamp Index columns, please set only one: {columns}"
399    ))]
400    TransformMultipleTimestampIndex {
401        columns: String,
402        #[snafu(implicit)]
403        location: Location,
404    },
405    #[snafu(display(
406        "Transform must have exactly one field specified as timestamp Index, but got {count}: {columns}"
407    ))]
408    TransformTimestampIndexCount {
409        count: usize,
410        columns: String,
411        #[snafu(implicit)]
412        location: Location,
413    },
414    #[snafu(display(
415        "Exactly one time-related processor and one timestamp value is required to use auto transform. `ignore_missing` can not be set to true."
416    ))]
417    AutoTransformOneTimestamp {
418        #[snafu(implicit)]
419        location: Location,
420    },
421    #[snafu(display("Invalid Pipeline doc version number: {}", version))]
422    InvalidVersionNumber {
423        version: String,
424        #[snafu(implicit)]
425        location: Location,
426    },
427    #[snafu(display("Type: {ty} value not supported for Epoch"))]
428    CoerceUnsupportedEpochType {
429        ty: String,
430        #[snafu(implicit)]
431        location: Location,
432    },
433    #[snafu(display("Failed to coerce string value '{s}' to type '{ty}'"))]
434    CoerceStringToType {
435        s: String,
436        ty: String,
437        #[snafu(implicit)]
438        location: Location,
439    },
440    #[snafu(display("Can not coerce json type to {ty}"))]
441    CoerceJsonTypeTo {
442        ty: String,
443        #[snafu(implicit)]
444        location: Location,
445    },
446    #[snafu(display(
447        "Can not coerce {ty} to json type. we only consider object and array to be json types."
448    ))]
449    CoerceTypeToJson {
450        ty: String,
451        #[snafu(implicit)]
452        location: Location,
453    },
454    #[snafu(display("Failed to coerce value: {msg}"))]
455    CoerceIncompatibleTypes {
456        msg: String,
457        #[snafu(implicit)]
458        location: Location,
459    },
460    #[snafu(display(
461        "Invalid resolution: '{resolution}'. Available resolutions: {valid_resolution}"
462    ))]
463    ValueInvalidResolution {
464        resolution: String,
465        valid_resolution: String,
466        #[snafu(implicit)]
467        location: Location,
468    },
469
470    #[snafu(display("Failed to parse type: '{t}'"))]
471    ValueParseType {
472        t: String,
473        #[snafu(implicit)]
474        location: Location,
475    },
476
477    #[snafu(display("Failed to parse {ty}: {v}"))]
478    ValueParseInt {
479        ty: String,
480        v: String,
481        #[snafu(source)]
482        error: std::num::ParseIntError,
483        #[snafu(implicit)]
484        location: Location,
485    },
486
487    #[snafu(display("Failed to parse {ty}: {v}"))]
488    ValueParseFloat {
489        ty: String,
490        v: String,
491        #[snafu(source)]
492        error: std::num::ParseFloatError,
493        #[snafu(implicit)]
494        location: Location,
495    },
496
497    #[snafu(display("Failed to parse {ty}: {v}"))]
498    ValueParseBoolean {
499        ty: String,
500        v: String,
501        #[snafu(source)]
502        error: std::str::ParseBoolError,
503        #[snafu(implicit)]
504        location: Location,
505    },
506    #[snafu(display("Default value not unsupported for type {value}"))]
507    ValueDefaultValueUnsupported {
508        value: String,
509        #[snafu(implicit)]
510        location: Location,
511    },
512
513    #[snafu(display("Unsupported yaml type: {value:?}"))]
514    ValueUnsupportedYamlType {
515        value: yaml_rust::Yaml,
516        #[snafu(implicit)]
517        location: Location,
518    },
519
520    #[snafu(display("key in Hash must be a string, but got {value:?}"))]
521    ValueYamlKeyMustBeString {
522        value: yaml_rust::Yaml,
523        #[snafu(implicit)]
524        location: Location,
525    },
526
527    #[snafu(display("Yaml load error."))]
528    YamlLoad {
529        #[snafu(source)]
530        error: yaml_rust::ScanError,
531        #[snafu(implicit)]
532        location: Location,
533    },
534    #[snafu(display("Yaml parse error."))]
535    YamlParse {
536        #[snafu(implicit)]
537        location: Location,
538    },
539    #[snafu(display("Column options error"))]
540    ColumnOptions {
541        #[snafu(source)]
542        source: api::error::Error,
543        #[snafu(implicit)]
544        location: Location,
545    },
546    #[snafu(display("Unsupported index type: {value}"))]
547    UnsupportedIndexType {
548        value: String,
549        #[snafu(implicit)]
550        location: Location,
551    },
552    #[snafu(display("Failed to parse json"))]
553    JsonParse {
554        #[snafu(source)]
555        error: serde_json::Error,
556        #[snafu(implicit)]
557        location: Location,
558    },
559    #[snafu(display(
560        "Column datatype mismatch. For column: {column}, expected datatype: {expected}, actual datatype: {actual}"
561    ))]
562    IdentifyPipelineColumnTypeMismatch {
563        column: String,
564        expected: String,
565        actual: String,
566        #[snafu(implicit)]
567        location: Location,
568    },
569    #[snafu(display("Parse json path error"))]
570    JsonPathParse {
571        #[snafu(implicit)]
572        location: Location,
573        #[snafu(source)]
574        error: jsonpath_rust::JsonPathParserError,
575    },
576    #[snafu(display("Json path result index not number"))]
577    JsonPathParseResultIndex {
578        #[snafu(implicit)]
579        location: Location,
580    },
581    #[snafu(display("Field is required for dispatcher"))]
582    FieldRequiredForDispatcher,
583    #[snafu(display("Table_suffix is required for dispatcher rule"))]
584    TableSuffixRequiredForDispatcherRule,
585    #[snafu(display("Value is required for dispatcher rule"))]
586    ValueRequiredForDispatcherRule,
587
588    #[snafu(display("Pipeline table not found"))]
589    PipelineTableNotFound {
590        #[snafu(implicit)]
591        location: Location,
592    },
593
594    #[snafu(display("Failed to insert pipeline to pipelines table"))]
595    InsertPipeline {
596        #[snafu(source)]
597        source: operator::error::Error,
598        #[snafu(implicit)]
599        location: Location,
600    },
601
602    #[snafu(display("Pipeline not found, name: {}, version: {}", name, version.map(|ts| ts.0.to_iso8601_string()).unwrap_or("latest".to_string())))]
603    PipelineNotFound {
604        name: String,
605        version: Option<TimestampNanosecond>,
606        #[snafu(implicit)]
607        location: Location,
608    },
609
610    #[snafu(display(
611        "Multiple pipelines with different schemas found, but none under current schema. Please replicate one of them or delete until only one schema left. schemas: {}",
612        schemas
613    ))]
614    MultiPipelineWithDiffSchema {
615        schemas: String,
616        #[snafu(implicit)]
617        location: Location,
618    },
619
620    #[snafu(display(
621        "The return value's length of the record batch does not match, see debug log for details"
622    ))]
623    RecordBatchLenNotMatch {
624        #[snafu(implicit)]
625        location: Location,
626    },
627
628    #[snafu(display("Failed to collect record batch"))]
629    CollectRecords {
630        #[snafu(implicit)]
631        location: Location,
632        #[snafu(source)]
633        source: common_recordbatch::error::Error,
634    },
635
636    #[snafu(display("A valid table suffix template is required for tablesuffix section"))]
637    RequiredTableSuffixTemplate,
638
639    #[snafu(display("Invalid table suffix template, input: {}", input))]
640    InvalidTableSuffixTemplate {
641        input: String,
642        #[snafu(implicit)]
643        location: Location,
644    },
645
646    #[snafu(display("Failed to compile VRL, {}", msg))]
647    CompileVrl {
648        msg: String,
649        #[snafu(implicit)]
650        location: Location,
651    },
652
653    #[snafu(display("Failed to execute VRL, {}", msg))]
654    ExecuteVrl {
655        msg: String,
656        #[snafu(implicit)]
657        location: Location,
658    },
659    #[snafu(display("Invalid timestamp value: {}", input))]
660    InvalidTimestamp {
661        input: String,
662        #[snafu(implicit)]
663        location: Location,
664    },
665
666    #[snafu(display("Invalid epoch value '{}' for resolution '{}'", value, resolution))]
667    InvalidEpochForResolution {
668        value: i64,
669        resolution: String,
670        #[snafu(implicit)]
671        location: Location,
672    },
673    #[snafu(display("Please don't use regex in Vrl script"))]
674    VrlRegexValue {
675        #[snafu(implicit)]
676        location: Location,
677    },
678
679    #[snafu(display("Vrl script should return `.` in the end"))]
680    VrlReturnValue {
681        #[snafu(implicit)]
682        location: Location,
683    },
684
685    #[snafu(display("Failed to cast type, msg: {}", msg))]
686    CastType {
687        msg: String,
688        #[snafu(implicit)]
689        location: Location,
690    },
691
692    #[snafu(display("Top level value must be map"))]
693    ValueMustBeMap {
694        #[snafu(implicit)]
695        location: Location,
696    },
697
698    #[snafu(display("Failed to build DataFusion logical plan"))]
699    BuildDfLogicalPlan {
700        #[snafu(source)]
701        error: datafusion_common::DataFusionError,
702        #[snafu(implicit)]
703        location: Location,
704    },
705
706    #[snafu(display("Failed to execute internal statement"))]
707    ExecuteInternalStatement {
708        #[snafu(source)]
709        source: query::error::Error,
710        #[snafu(implicit)]
711        location: Location,
712    },
713
714    #[snafu(display("Failed to create dataframe"))]
715    DataFrame {
716        #[snafu(source)]
717        source: query::error::Error,
718        #[snafu(implicit)]
719        location: Location,
720    },
721
722    #[snafu(display("General catalog error"))]
723    Catalog {
724        #[snafu(source)]
725        source: catalog::error::Error,
726        #[snafu(implicit)]
727        location: Location,
728    },
729
730    #[snafu(display("Failed to create table"))]
731    CreateTable {
732        #[snafu(source)]
733        source: operator::error::Error,
734        #[snafu(implicit)]
735        location: Location,
736    },
737
738    #[snafu(display("Invalid pipeline version format: {}", version))]
739    InvalidPipelineVersion {
740        version: String,
741        #[snafu(implicit)]
742        location: Location,
743    },
744
745    #[snafu(display("Invalid custom time index config: {}, reason: {}", config, reason))]
746    InvalidCustomTimeIndex {
747        config: String,
748        reason: String,
749        #[snafu(implicit)]
750        location: Location,
751    },
752
753    #[snafu(display("Pipeline is required for this API."))]
754    PipelineMissing {
755        #[snafu(implicit)]
756        location: Location,
757    },
758
759    #[snafu(display("Time index must be non null."))]
760    TimeIndexMustBeNonNull {
761        #[snafu(implicit)]
762        location: Location,
763    },
764
765    #[snafu(display("Float is NaN"))]
766    FloatIsNan {
767        #[snafu(source)]
768        error: ordered_float::FloatIsNan,
769        #[snafu(implicit)]
770        location: Location,
771    },
772
773    #[snafu(display("Unsupported type in pipeline: {}", ty))]
774    UnsupportedTypeInPipeline {
775        ty: String,
776        #[snafu(implicit)]
777        location: Location,
778    },
779}
780
781pub type Result<T> = std::result::Result<T, Error>;
782
783impl ErrorExt for Error {
784    fn status_code(&self) -> StatusCode {
785        use Error::*;
786        match self {
787            CastType { .. } => StatusCode::Unexpected,
788            PipelineTableNotFound { .. } => StatusCode::TableNotFound,
789            InsertPipeline { source, .. } => source.status_code(),
790            CollectRecords { source, .. } => source.status_code(),
791            PipelineNotFound { .. }
792            | InvalidPipelineVersion { .. }
793            | InvalidCustomTimeIndex { .. }
794            | TimeIndexMustBeNonNull { .. } => StatusCode::InvalidArguments,
795            MultiPipelineWithDiffSchema { .. } | ValueMustBeMap { .. } => StatusCode::IllegalState,
796            BuildDfLogicalPlan { .. } | RecordBatchLenNotMatch { .. } => StatusCode::Internal,
797            ExecuteInternalStatement { source, .. } => source.status_code(),
798            DataFrame { source, .. } => source.status_code(),
799            Catalog { source, .. } => source.status_code(),
800            CreateTable { source, .. } => source.status_code(),
801
802            EmptyInputField { .. }
803            | MissingInputField { .. }
804            | InvalidFieldRename { .. }
805            | ProcessorMustBeMap { .. }
806            | ProcessorMissingField { .. }
807            | ProcessorExpectString { .. }
808            | ProcessorUnsupportedValue { .. }
809            | ProcessorKeyMustBeString { .. }
810            | ProcessorFailedToParseString { .. }
811            | ProcessorMustHaveStringKey { .. }
812            | UnsupportedProcessor { .. }
813            | FieldMustBeType { .. }
814            | FailedParseFieldFromString { .. }
815            | FailedToParseIntKey { .. }
816            | FailedToParseInt { .. }
817            | FailedToParseFloatKey { .. }
818            | IntermediateKeyIndex { .. }
819            | CmcdMissingValue { .. }
820            | CmcdMissingKey { .. }
821            | KeyMustBeString { .. }
822            | CsvRead { .. }
823            | CsvNoRecord { .. }
824            | CsvSeparatorName { .. }
825            | CsvQuoteName { .. }
826            | DateParseTimezone { .. }
827            | DateParse { .. }
828            | DateFailedToGetLocalTimezone { .. }
829            | DissectInvalidPattern { .. }
830            | DissectEmptyPattern { .. }
831            | DissectSplitExceedsInput { .. }
832            | DissectSplitNotMatchInput { .. }
833            | DissectConsecutiveNames { .. }
834            | DissectNoMatchingPattern { .. }
835            | DissectModifierAlreadySet { .. }
836            | DissectAppendOrderAlreadySet { .. }
837            | DissectOrderOnlyAppend { .. }
838            | DissectOrderOnlyAppendModifier { .. }
839            | DissectEndModifierAlreadySet { .. }
840            | EpochInvalidResolution { .. }
841            | GsubPatternRequired { .. }
842            | GsubReplacementRequired { .. }
843            | Regex { .. }
844            | JoinSeparatorRequired { .. }
845            | LetterInvalidMethod { .. }
846            | RegexNamedGroupNotFound { .. }
847            | RegexNoValidField { .. }
848            | RegexNoValidPattern { .. }
849            | UrlEncodingInvalidMethod { .. }
850            | DigestPatternInvalid { .. }
851            | TransformOnFailureInvalidValue { .. }
852            | TransformElementMustBeMap { .. }
853            | TransformFieldMustBeSet { .. }
854            | TransformTypeMustBeSet { .. }
855            | TransformColumnNameMustBeUnique { .. }
856            | TransformMultipleTimestampIndex { .. }
857            | TransformTimestampIndexCount { .. }
858            | AutoTransformOneTimestamp { .. }
859            | InvalidVersionNumber { .. }
860            | CoerceUnsupportedEpochType { .. }
861            | CoerceStringToType { .. }
862            | CoerceJsonTypeTo { .. }
863            | CoerceTypeToJson { .. }
864            | CoerceIncompatibleTypes { .. }
865            | ValueInvalidResolution { .. }
866            | ValueParseType { .. }
867            | ValueParseInt { .. }
868            | ValueParseFloat { .. }
869            | ValueParseBoolean { .. }
870            | ValueDefaultValueUnsupported { .. }
871            | ValueUnsupportedYamlType { .. }
872            | ValueYamlKeyMustBeString { .. }
873            | YamlLoad { .. }
874            | YamlParse { .. }
875            | ColumnOptions { .. }
876            | UnsupportedIndexType { .. }
877            | IdentifyPipelineColumnTypeMismatch { .. }
878            | JsonParse { .. }
879            | JsonPathParse { .. }
880            | JsonPathParseResultIndex { .. }
881            | FieldRequiredForDispatcher
882            | TableSuffixRequiredForDispatcherRule
883            | ValueRequiredForDispatcherRule
884            | RequiredTableSuffixTemplate
885            | InvalidTableSuffixTemplate { .. }
886            | CompileVrl { .. }
887            | ExecuteVrl { .. }
888            | InvalidTimestamp { .. }
889            | VrlRegexValue { .. }
890            | VrlReturnValue { .. }
891            | PipelineMissing { .. } => StatusCode::InvalidArguments,
892
893            FloatIsNan { .. }
894            | InvalidEpochForResolution { .. }
895            | UnsupportedTypeInPipeline { .. } => StatusCode::InvalidArguments,
896        }
897    }
898
899    fn as_any(&self) -> &dyn Any {
900        self
901    }
902}