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("Transform must have exactly one field specified as timestamp Index, but got {count}: {columns}"))]
406    TransformTimestampIndexCount {
407        count: usize,
408        columns: String,
409        #[snafu(implicit)]
410        location: Location,
411    },
412    #[snafu(display("Exactly one time-related processor and one timestamp value is required to use auto transform. `ignore_missing` can not be set to true."))]
413    AutoTransformOneTimestamp {
414        #[snafu(implicit)]
415        location: Location,
416    },
417    #[snafu(display("Invalid Pipeline doc version number: {}", version))]
418    InvalidVersionNumber {
419        version: String,
420        #[snafu(implicit)]
421        location: Location,
422    },
423    #[snafu(display("Type: {ty} value not supported for Epoch"))]
424    CoerceUnsupportedEpochType {
425        ty: String,
426        #[snafu(implicit)]
427        location: Location,
428    },
429    #[snafu(display("Failed to coerce string value '{s}' to type '{ty}'"))]
430    CoerceStringToType {
431        s: String,
432        ty: String,
433        #[snafu(implicit)]
434        location: Location,
435    },
436    #[snafu(display("Can not coerce json type to {ty}"))]
437    CoerceJsonTypeTo {
438        ty: String,
439        #[snafu(implicit)]
440        location: Location,
441    },
442    #[snafu(display(
443        "Can not coerce {ty} to json type. we only consider object and array to be json types."
444    ))]
445    CoerceTypeToJson {
446        ty: String,
447        #[snafu(implicit)]
448        location: Location,
449    },
450    #[snafu(display("Failed to coerce value: {msg}"))]
451    CoerceIncompatibleTypes {
452        msg: String,
453        #[snafu(implicit)]
454        location: Location,
455    },
456    #[snafu(display(
457        "Invalid resolution: '{resolution}'. Available resolutions: {valid_resolution}"
458    ))]
459    ValueInvalidResolution {
460        resolution: String,
461        valid_resolution: String,
462        #[snafu(implicit)]
463        location: Location,
464    },
465
466    #[snafu(display("Failed to parse type: '{t}'"))]
467    ValueParseType {
468        t: String,
469        #[snafu(implicit)]
470        location: Location,
471    },
472
473    #[snafu(display("Failed to parse {ty}: {v}"))]
474    ValueParseInt {
475        ty: String,
476        v: String,
477        #[snafu(source)]
478        error: std::num::ParseIntError,
479        #[snafu(implicit)]
480        location: Location,
481    },
482
483    #[snafu(display("Failed to parse {ty}: {v}"))]
484    ValueParseFloat {
485        ty: String,
486        v: String,
487        #[snafu(source)]
488        error: std::num::ParseFloatError,
489        #[snafu(implicit)]
490        location: Location,
491    },
492
493    #[snafu(display("Failed to parse {ty}: {v}"))]
494    ValueParseBoolean {
495        ty: String,
496        v: String,
497        #[snafu(source)]
498        error: std::str::ParseBoolError,
499        #[snafu(implicit)]
500        location: Location,
501    },
502    #[snafu(display("Default value not unsupported for type {value}"))]
503    ValueDefaultValueUnsupported {
504        value: String,
505        #[snafu(implicit)]
506        location: Location,
507    },
508
509    #[snafu(display("Unsupported yaml type: {value:?}"))]
510    ValueUnsupportedYamlType {
511        value: yaml_rust::Yaml,
512        #[snafu(implicit)]
513        location: Location,
514    },
515
516    #[snafu(display("key in Hash must be a string, but got {value:?}"))]
517    ValueYamlKeyMustBeString {
518        value: yaml_rust::Yaml,
519        #[snafu(implicit)]
520        location: Location,
521    },
522
523    #[snafu(display("Yaml load error."))]
524    YamlLoad {
525        #[snafu(source)]
526        error: yaml_rust::ScanError,
527        #[snafu(implicit)]
528        location: Location,
529    },
530    #[snafu(display("Yaml parse error."))]
531    YamlParse {
532        #[snafu(implicit)]
533        location: Location,
534    },
535    #[snafu(display("Column options error"))]
536    ColumnOptions {
537        #[snafu(source)]
538        source: api::error::Error,
539        #[snafu(implicit)]
540        location: Location,
541    },
542    #[snafu(display("Unsupported index type: {value}"))]
543    UnsupportedIndexType {
544        value: String,
545        #[snafu(implicit)]
546        location: Location,
547    },
548    #[snafu(display("Failed to parse json"))]
549    JsonParse {
550        #[snafu(source)]
551        error: serde_json::Error,
552        #[snafu(implicit)]
553        location: Location,
554    },
555    #[snafu(display("Column datatype mismatch. For column: {column}, expected datatype: {expected}, actual datatype: {actual}"))]
556    IdentifyPipelineColumnTypeMismatch {
557        column: String,
558        expected: String,
559        actual: String,
560        #[snafu(implicit)]
561        location: Location,
562    },
563    #[snafu(display("Parse json path error"))]
564    JsonPathParse {
565        #[snafu(implicit)]
566        location: Location,
567        #[snafu(source)]
568        error: jsonpath_rust::JsonPathParserError,
569    },
570    #[snafu(display("Json path result index not number"))]
571    JsonPathParseResultIndex {
572        #[snafu(implicit)]
573        location: Location,
574    },
575    #[snafu(display("Field is required for dispatcher"))]
576    FieldRequiredForDispatcher,
577    #[snafu(display("Table_suffix is required for dispatcher rule"))]
578    TableSuffixRequiredForDispatcherRule,
579    #[snafu(display("Value is required for dispatcher rule"))]
580    ValueRequiredForDispatcherRule,
581    #[snafu(display(
582        "Reached max nested levels when flattening JSON object: {max_nested_levels}"
583    ))]
584    ReachedMaxNestedLevels {
585        max_nested_levels: usize,
586        #[snafu(implicit)]
587        location: Location,
588    },
589
590    #[snafu(display("Pipeline table not found"))]
591    PipelineTableNotFound {
592        #[snafu(implicit)]
593        location: Location,
594    },
595
596    #[snafu(display("Failed to insert pipeline to pipelines table"))]
597    InsertPipeline {
598        #[snafu(source)]
599        source: operator::error::Error,
600        #[snafu(implicit)]
601        location: Location,
602    },
603
604    #[snafu(display("Pipeline not found, name: {}, version: {}", name, version.map(|ts| ts.0.to_iso8601_string()).unwrap_or("latest".to_string())))]
605    PipelineNotFound {
606        name: String,
607        version: Option<TimestampNanosecond>,
608        #[snafu(implicit)]
609        location: Location,
610    },
611
612    #[snafu(display(
613        "Multiple pipelines with different schemas found, but none under current schema. Please replicate one of them or delete until only one schema left. schemas: {}",
614        schemas
615    ))]
616    MultiPipelineWithDiffSchema {
617        schemas: String,
618        #[snafu(implicit)]
619        location: Location,
620    },
621
622    #[snafu(display(
623        "The return value's length of the record batch does not match, see debug log for details"
624    ))]
625    RecordBatchLenNotMatch {
626        #[snafu(implicit)]
627        location: Location,
628    },
629
630    #[snafu(display("Failed to collect record batch"))]
631    CollectRecords {
632        #[snafu(implicit)]
633        location: Location,
634        #[snafu(source)]
635        source: common_recordbatch::error::Error,
636    },
637
638    #[snafu(display("A valid table suffix template is required for tablesuffix section"))]
639    RequiredTableSuffixTemplate,
640
641    #[snafu(display("Invalid table suffix template, input: {}", input))]
642    InvalidTableSuffixTemplate {
643        input: String,
644        #[snafu(implicit)]
645        location: Location,
646    },
647
648    #[snafu(display("Failed to compile VRL, {}", msg))]
649    CompileVrl {
650        msg: String,
651        #[snafu(implicit)]
652        location: Location,
653    },
654
655    #[snafu(display("Failed to execute VRL, {}", msg))]
656    ExecuteVrl {
657        msg: String,
658        #[snafu(implicit)]
659        location: Location,
660    },
661    #[snafu(display("Invalid timestamp value: {}", input))]
662    InvalidTimestamp {
663        input: String,
664        #[snafu(implicit)]
665        location: Location,
666    },
667
668    #[snafu(display("Invalid epoch value '{}' for resolution '{}'", value, resolution))]
669    InvalidEpochForResolution {
670        value: i64,
671        resolution: String,
672        #[snafu(implicit)]
673        location: Location,
674    },
675    #[snafu(display("Please don't use regex in Vrl script"))]
676    VrlRegexValue {
677        #[snafu(implicit)]
678        location: Location,
679    },
680
681    #[snafu(display("Vrl script should return `.` in the end"))]
682    VrlReturnValue {
683        #[snafu(implicit)]
684        location: Location,
685    },
686
687    #[snafu(display("Failed to cast type, msg: {}", msg))]
688    CastType {
689        msg: String,
690        #[snafu(implicit)]
691        location: Location,
692    },
693
694    #[snafu(display("Top level value must be map"))]
695    ValueMustBeMap {
696        #[snafu(implicit)]
697        location: Location,
698    },
699
700    #[snafu(display("Failed to build DataFusion logical plan"))]
701    BuildDfLogicalPlan {
702        #[snafu(source)]
703        error: datafusion_common::DataFusionError,
704        #[snafu(implicit)]
705        location: Location,
706    },
707
708    #[snafu(display("Failed to execute internal statement"))]
709    ExecuteInternalStatement {
710        #[snafu(source)]
711        source: query::error::Error,
712        #[snafu(implicit)]
713        location: Location,
714    },
715
716    #[snafu(display("Failed to create dataframe"))]
717    DataFrame {
718        #[snafu(source)]
719        source: query::error::Error,
720        #[snafu(implicit)]
721        location: Location,
722    },
723
724    #[snafu(display("General catalog error"))]
725    Catalog {
726        #[snafu(source)]
727        source: catalog::error::Error,
728        #[snafu(implicit)]
729        location: Location,
730    },
731
732    #[snafu(display("Failed to create table"))]
733    CreateTable {
734        #[snafu(source)]
735        source: operator::error::Error,
736        #[snafu(implicit)]
737        location: Location,
738    },
739
740    #[snafu(display("Invalid pipeline version format: {}", version))]
741    InvalidPipelineVersion {
742        version: String,
743        #[snafu(implicit)]
744        location: Location,
745    },
746
747    #[snafu(display("Invalid custom time index config: {}, reason: {}", config, reason))]
748    InvalidCustomTimeIndex {
749        config: String,
750        reason: String,
751        #[snafu(implicit)]
752        location: Location,
753    },
754
755    #[snafu(display("Pipeline is required for this API."))]
756    PipelineMissing {
757        #[snafu(implicit)]
758        location: Location,
759    },
760
761    #[snafu(display("Time index must be non null."))]
762    TimeIndexMustBeNonNull {
763        #[snafu(implicit)]
764        location: Location,
765    },
766
767    #[snafu(display("Float is NaN"))]
768    FloatIsNan {
769        #[snafu(source)]
770        error: ordered_float::FloatIsNan,
771        #[snafu(implicit)]
772        location: Location,
773    },
774
775    #[snafu(display("Unsupported type in pipeline: {}", ty))]
776    UnsupportedTypeInPipeline {
777        ty: String,
778        #[snafu(implicit)]
779        location: Location,
780    },
781}
782
783pub type Result<T> = std::result::Result<T, Error>;
784
785impl ErrorExt for Error {
786    fn status_code(&self) -> StatusCode {
787        use Error::*;
788        match self {
789            CastType { .. } => StatusCode::Unexpected,
790            PipelineTableNotFound { .. } => StatusCode::TableNotFound,
791            InsertPipeline { source, .. } => source.status_code(),
792            CollectRecords { source, .. } => source.status_code(),
793            PipelineNotFound { .. }
794            | InvalidPipelineVersion { .. }
795            | InvalidCustomTimeIndex { .. }
796            | TimeIndexMustBeNonNull { .. } => StatusCode::InvalidArguments,
797            MultiPipelineWithDiffSchema { .. } | ValueMustBeMap { .. } => StatusCode::IllegalState,
798            BuildDfLogicalPlan { .. } | RecordBatchLenNotMatch { .. } => StatusCode::Internal,
799            ExecuteInternalStatement { source, .. } => source.status_code(),
800            DataFrame { source, .. } => source.status_code(),
801            Catalog { source, .. } => source.status_code(),
802            CreateTable { source, .. } => source.status_code(),
803
804            EmptyInputField { .. }
805            | MissingInputField { .. }
806            | InvalidFieldRename { .. }
807            | ProcessorMustBeMap { .. }
808            | ProcessorMissingField { .. }
809            | ProcessorExpectString { .. }
810            | ProcessorUnsupportedValue { .. }
811            | ProcessorKeyMustBeString { .. }
812            | ProcessorFailedToParseString { .. }
813            | ProcessorMustHaveStringKey { .. }
814            | UnsupportedProcessor { .. }
815            | FieldMustBeType { .. }
816            | FailedParseFieldFromString { .. }
817            | FailedToParseIntKey { .. }
818            | FailedToParseInt { .. }
819            | FailedToParseFloatKey { .. }
820            | IntermediateKeyIndex { .. }
821            | CmcdMissingValue { .. }
822            | CmcdMissingKey { .. }
823            | KeyMustBeString { .. }
824            | CsvRead { .. }
825            | CsvNoRecord { .. }
826            | CsvSeparatorName { .. }
827            | CsvQuoteName { .. }
828            | DateParseTimezone { .. }
829            | DateParse { .. }
830            | DateFailedToGetLocalTimezone { .. }
831            | DissectInvalidPattern { .. }
832            | DissectEmptyPattern { .. }
833            | DissectSplitExceedsInput { .. }
834            | DissectSplitNotMatchInput { .. }
835            | DissectConsecutiveNames { .. }
836            | DissectNoMatchingPattern { .. }
837            | DissectModifierAlreadySet { .. }
838            | DissectAppendOrderAlreadySet { .. }
839            | DissectOrderOnlyAppend { .. }
840            | DissectOrderOnlyAppendModifier { .. }
841            | DissectEndModifierAlreadySet { .. }
842            | EpochInvalidResolution { .. }
843            | GsubPatternRequired { .. }
844            | GsubReplacementRequired { .. }
845            | Regex { .. }
846            | JoinSeparatorRequired { .. }
847            | LetterInvalidMethod { .. }
848            | RegexNamedGroupNotFound { .. }
849            | RegexNoValidField { .. }
850            | RegexNoValidPattern { .. }
851            | UrlEncodingInvalidMethod { .. }
852            | DigestPatternInvalid { .. }
853            | TransformOnFailureInvalidValue { .. }
854            | TransformElementMustBeMap { .. }
855            | TransformFieldMustBeSet { .. }
856            | TransformTypeMustBeSet { .. }
857            | TransformColumnNameMustBeUnique { .. }
858            | TransformMultipleTimestampIndex { .. }
859            | TransformTimestampIndexCount { .. }
860            | AutoTransformOneTimestamp { .. }
861            | InvalidVersionNumber { .. }
862            | CoerceUnsupportedEpochType { .. }
863            | CoerceStringToType { .. }
864            | CoerceJsonTypeTo { .. }
865            | CoerceTypeToJson { .. }
866            | CoerceIncompatibleTypes { .. }
867            | ValueInvalidResolution { .. }
868            | ValueParseType { .. }
869            | ValueParseInt { .. }
870            | ValueParseFloat { .. }
871            | ValueParseBoolean { .. }
872            | ValueDefaultValueUnsupported { .. }
873            | ValueUnsupportedYamlType { .. }
874            | ValueYamlKeyMustBeString { .. }
875            | YamlLoad { .. }
876            | YamlParse { .. }
877            | ColumnOptions { .. }
878            | UnsupportedIndexType { .. }
879            | IdentifyPipelineColumnTypeMismatch { .. }
880            | JsonParse { .. }
881            | JsonPathParse { .. }
882            | JsonPathParseResultIndex { .. }
883            | FieldRequiredForDispatcher
884            | TableSuffixRequiredForDispatcherRule
885            | ValueRequiredForDispatcherRule
886            | ReachedMaxNestedLevels { .. }
887            | RequiredTableSuffixTemplate
888            | InvalidTableSuffixTemplate { .. }
889            | CompileVrl { .. }
890            | ExecuteVrl { .. }
891            | InvalidTimestamp { .. }
892            | VrlRegexValue { .. }
893            | VrlReturnValue { .. }
894            | PipelineMissing { .. } => StatusCode::InvalidArguments,
895
896            FloatIsNan { .. }
897            | InvalidEpochForResolution { .. }
898            | UnsupportedTypeInPipeline { .. } => StatusCode::InvalidArguments,
899        }
900    }
901
902    fn as_any(&self) -> &dyn Any {
903        self
904    }
905}