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: crate::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("Failed to get timestamp"))]
233    DateFailedToGetTimestamp {
234        #[snafu(implicit)]
235        location: Location,
236    },
237
238    #[snafu(display("Processor {processor}: invalid format {s}"))]
239    DateInvalidFormat {
240        s: String,
241        processor: String,
242        #[snafu(implicit)]
243        location: Location,
244    },
245
246    #[snafu(display("Invalid Pattern: '{s}'. {detail}"))]
247    DissectInvalidPattern {
248        s: String,
249        detail: String,
250        #[snafu(implicit)]
251        location: Location,
252    },
253
254    #[snafu(display("Empty pattern is not allowed"))]
255    DissectEmptyPattern {
256        #[snafu(implicit)]
257        location: Location,
258    },
259    #[snafu(display("Split: '{split}' exceeds the input"))]
260    DissectSplitExceedsInput {
261        split: String,
262        #[snafu(implicit)]
263        location: Location,
264    },
265    #[snafu(display("Split: '{split}' does not match the input '{input}'"))]
266    DissectSplitNotMatchInput {
267        split: String,
268        input: String,
269        #[snafu(implicit)]
270        location: Location,
271    },
272    #[snafu(display("Consecutive names are not allowed: '{name1}' '{name2}'"))]
273    DissectConsecutiveNames {
274        name1: String,
275        name2: String,
276        #[snafu(implicit)]
277        location: Location,
278    },
279    #[snafu(display("No matching pattern found"))]
280    DissectNoMatchingPattern {
281        #[snafu(implicit)]
282        location: Location,
283    },
284    #[snafu(display("Modifier '{m}' already set, but found {modifier}"))]
285    DissectModifierAlreadySet {
286        m: String,
287        modifier: String,
288        #[snafu(implicit)]
289        location: Location,
290    },
291
292    #[snafu(display("Append Order modifier is already set to '{n}', cannot be set to {order}"))]
293    DissectAppendOrderAlreadySet {
294        n: String,
295        order: u32,
296        #[snafu(implicit)]
297        location: Location,
298    },
299    #[snafu(display("Order can only be set to Append Modifier, current modifier is {m}"))]
300    DissectOrderOnlyAppend {
301        m: String,
302        #[snafu(implicit)]
303        location: Location,
304    },
305
306    #[snafu(display("Order can only be set to Append Modifier"))]
307    DissectOrderOnlyAppendModifier {
308        #[snafu(implicit)]
309        location: Location,
310    },
311
312    #[snafu(display("End modifier already set: '{m}'"))]
313    DissectEndModifierAlreadySet {
314        m: String,
315        #[snafu(implicit)]
316        location: Location,
317    },
318    #[snafu(display("Invalid resolution: {resolution}"))]
319    EpochInvalidResolution {
320        resolution: String,
321        #[snafu(implicit)]
322        location: Location,
323    },
324    #[snafu(display("Pattern is required"))]
325    GsubPatternRequired {
326        #[snafu(implicit)]
327        location: Location,
328    },
329    #[snafu(display("Replacement is required"))]
330    GsubReplacementRequired {
331        #[snafu(implicit)]
332        location: Location,
333    },
334    #[snafu(display("Invalid regex pattern: {pattern}"))]
335    Regex {
336        #[snafu(source)]
337        error: regex::Error,
338        pattern: String,
339        #[snafu(implicit)]
340        location: Location,
341    },
342    #[snafu(display("Separator is required"))]
343    JoinSeparatorRequired {
344        #[snafu(implicit)]
345        location: Location,
346    },
347    #[snafu(display("Invalid method: {method}"))]
348    LetterInvalidMethod {
349        method: String,
350        #[snafu(implicit)]
351        location: Location,
352    },
353    #[snafu(display("No named group found in regex {origin}"))]
354    RegexNamedGroupNotFound {
355        origin: String,
356        #[snafu(implicit)]
357        location: Location,
358    },
359    #[snafu(display("No valid field found in {processor} processor"))]
360    RegexNoValidField {
361        processor: String,
362        #[snafu(implicit)]
363        location: Location,
364    },
365    #[snafu(display("No valid pattern found in {processor} processor"))]
366    RegexNoValidPattern {
367        processor: String,
368        #[snafu(implicit)]
369        location: Location,
370    },
371    #[snafu(display("Invalid method: {s}"))]
372    UrlEncodingInvalidMethod {
373        s: String,
374        #[snafu(implicit)]
375        location: Location,
376    },
377    #[snafu(display("Wrong digest pattern: {pattern}"))]
378    DigestPatternInvalid {
379        pattern: String,
380        #[snafu(implicit)]
381        location: Location,
382    },
383    #[snafu(display("Url decoding error"))]
384    UrlEncodingDecode {
385        #[snafu(source)]
386        error: std::string::FromUtf8Error,
387        #[snafu(implicit)]
388        location: Location,
389    },
390    #[snafu(display("Invalid transform on_failure value: {value}"))]
391    TransformOnFailureInvalidValue {
392        value: String,
393        #[snafu(implicit)]
394        location: Location,
395    },
396    #[snafu(display("Transform element must be a map"))]
397    TransformElementMustBeMap {
398        #[snafu(implicit)]
399        location: Location,
400    },
401    #[snafu(display("Transform {fields:?} type MUST BE set before default {default}"))]
402    TransformTypeMustBeSet {
403        fields: String,
404        default: String,
405        #[snafu(implicit)]
406        location: Location,
407    },
408    #[snafu(display("Column name must be unique, but got duplicated: {duplicates}"))]
409    TransformColumnNameMustBeUnique {
410        duplicates: String,
411        #[snafu(implicit)]
412        location: Location,
413    },
414    #[snafu(display(
415        "Illegal to set multiple timestamp Index columns, please set only one: {columns}"
416    ))]
417    TransformMultipleTimestampIndex {
418        columns: String,
419        #[snafu(implicit)]
420        location: Location,
421    },
422    #[snafu(display("Transform must have exactly one field specified as timestamp Index, but got {count}: {columns}"))]
423    TransformTimestampIndexCount {
424        count: usize,
425        columns: String,
426        #[snafu(implicit)]
427        location: Location,
428    },
429    #[snafu(display("Exactly one time-related processor and one timestamp value is required to use auto transform"))]
430    AutoTransformOneTimestamp {
431        #[snafu(implicit)]
432        location: Location,
433    },
434    #[snafu(display("Null type not supported"))]
435    CoerceUnsupportedNullType {
436        #[snafu(implicit)]
437        location: Location,
438    },
439    #[snafu(display("Null type not supported when to coerce '{ty}' type"))]
440    CoerceUnsupportedNullTypeTo {
441        ty: String,
442        #[snafu(implicit)]
443        location: Location,
444    },
445    #[snafu(display("Type: {ty} value not supported for Epoch"))]
446    CoerceUnsupportedEpochType {
447        ty: String,
448        #[snafu(implicit)]
449        location: Location,
450    },
451    #[snafu(display("Failed to coerce string value '{s}' to type '{ty}'"))]
452    CoerceStringToType {
453        s: String,
454        ty: String,
455        #[snafu(implicit)]
456        location: Location,
457    },
458    #[snafu(display("Can not coerce json type to {ty}"))]
459    CoerceJsonTypeTo {
460        ty: String,
461        #[snafu(implicit)]
462        location: Location,
463    },
464    #[snafu(display(
465        "Can not coerce {ty} to json type. we only consider object and array to be json types."
466    ))]
467    CoerceTypeToJson {
468        ty: String,
469        #[snafu(implicit)]
470        location: Location,
471    },
472    #[snafu(display("Failed to coerce value: {msg}"))]
473    CoerceIncompatibleTypes {
474        msg: String,
475        #[snafu(implicit)]
476        location: Location,
477    },
478    #[snafu(display(
479        "Invalid resolution: '{resolution}'. Available resolutions: {valid_resolution}"
480    ))]
481    ValueInvalidResolution {
482        resolution: String,
483        valid_resolution: String,
484        #[snafu(implicit)]
485        location: Location,
486    },
487
488    #[snafu(display("Failed to parse type: '{t}'"))]
489    ValueParseType {
490        t: String,
491        #[snafu(implicit)]
492        location: Location,
493    },
494
495    #[snafu(display("Failed to parse {ty}: {v}"))]
496    ValueParseInt {
497        ty: String,
498        v: String,
499        #[snafu(source)]
500        error: std::num::ParseIntError,
501        #[snafu(implicit)]
502        location: Location,
503    },
504
505    #[snafu(display("Failed to parse {ty}: {v}"))]
506    ValueParseFloat {
507        ty: String,
508        v: String,
509        #[snafu(source)]
510        error: std::num::ParseFloatError,
511        #[snafu(implicit)]
512        location: Location,
513    },
514
515    #[snafu(display("Failed to parse {ty}: {v}"))]
516    ValueParseBoolean {
517        ty: String,
518        v: String,
519        #[snafu(source)]
520        error: std::str::ParseBoolError,
521        #[snafu(implicit)]
522        location: Location,
523    },
524    #[snafu(display("Default value not unsupported for type {value}"))]
525    ValueDefaultValueUnsupported {
526        value: String,
527        #[snafu(implicit)]
528        location: Location,
529    },
530
531    #[snafu(display("Unsupported yaml type: {value:?}"))]
532    ValueUnsupportedYamlType {
533        value: yaml_rust::Yaml,
534        #[snafu(implicit)]
535        location: Location,
536    },
537
538    #[snafu(display("key in Hash must be a string, but got {value:?}"))]
539    ValueYamlKeyMustBeString {
540        value: yaml_rust::Yaml,
541        #[snafu(implicit)]
542        location: Location,
543    },
544
545    #[snafu(display("Yaml load error."))]
546    YamlLoad {
547        #[snafu(source)]
548        error: yaml_rust::ScanError,
549        #[snafu(implicit)]
550        location: Location,
551    },
552    #[snafu(display("Yaml parse error."))]
553    YamlParse {
554        #[snafu(implicit)]
555        location: Location,
556    },
557    #[snafu(display("Input value must be an object"))]
558    InputValueMustBeObject {
559        #[snafu(implicit)]
560        location: Location,
561    },
562
563    #[snafu(display("Column options error"))]
564    ColumnOptions {
565        #[snafu(source)]
566        source: api::error::Error,
567        #[snafu(implicit)]
568        location: Location,
569    },
570    #[snafu(display("Unsupported index type: {value}"))]
571    UnsupportedIndexType {
572        value: String,
573        #[snafu(implicit)]
574        location: Location,
575    },
576    #[snafu(display("Unsupported number type: {value:?}"))]
577    UnsupportedNumberType {
578        value: serde_json::Number,
579        #[snafu(implicit)]
580        location: Location,
581    },
582    #[snafu(display("Failed to parse json"))]
583    JsonParse {
584        #[snafu(source)]
585        error: serde_json::Error,
586        #[snafu(implicit)]
587        location: Location,
588    },
589    #[snafu(display("Column datatype mismatch. For column: {column}, expected datatype: {expected}, actual datatype: {actual}"))]
590    IdentifyPipelineColumnTypeMismatch {
591        column: String,
592        expected: String,
593        actual: String,
594        #[snafu(implicit)]
595        location: Location,
596    },
597    #[snafu(display("Parse json path error"))]
598    JsonPathParse {
599        #[snafu(implicit)]
600        location: Location,
601        #[snafu(source)]
602        error: jsonpath_rust::JsonPathParserError,
603    },
604    #[snafu(display("Json path result index not number"))]
605    JsonPathParseResultIndex {
606        #[snafu(implicit)]
607        location: Location,
608    },
609    #[snafu(display("Field is required for dispatcher"))]
610    FieldRequiredForDispatcher,
611    #[snafu(display("Table_suffix is required for dispatcher rule"))]
612    TableSuffixRequiredForDispatcherRule,
613    #[snafu(display("Value is required for dispatcher rule"))]
614    ValueRequiredForDispatcherRule,
615    #[snafu(display(
616        "Reached max nested levels when flattening JSON object: {max_nested_levels}"
617    ))]
618    ReachedMaxNestedLevels {
619        max_nested_levels: usize,
620        #[snafu(implicit)]
621        location: Location,
622    },
623
624    #[snafu(display("Pipeline table not found"))]
625    PipelineTableNotFound {
626        #[snafu(implicit)]
627        location: Location,
628    },
629
630    #[snafu(display("Failed to insert pipeline to pipelines table"))]
631    InsertPipeline {
632        #[snafu(source)]
633        source: operator::error::Error,
634        #[snafu(implicit)]
635        location: Location,
636    },
637
638    #[snafu(display("Pipeline not found, name: {}, version: {}", name, version.map(|ts| ts.0.to_iso8601_string()).unwrap_or("latest".to_string())))]
639    PipelineNotFound {
640        name: String,
641        version: Option<TimestampNanosecond>,
642        #[snafu(implicit)]
643        location: Location,
644    },
645
646    #[snafu(display(
647        "Multiple pipelines with different schemas found, but none under current schema. Please replicate one of them or delete until only one schema left. schemas: {}",
648        schemas
649    ))]
650    MultiPipelineWithDiffSchema {
651        schemas: String,
652        #[snafu(implicit)]
653        location: Location,
654    },
655
656    #[snafu(display(
657        "The return value's length of the record batch does not match, see debug log for details"
658    ))]
659    RecordBatchLenNotMatch {
660        #[snafu(implicit)]
661        location: Location,
662    },
663
664    #[snafu(display("Failed to collect record batch"))]
665    CollectRecords {
666        #[snafu(implicit)]
667        location: Location,
668        #[snafu(source)]
669        source: common_recordbatch::error::Error,
670    },
671
672    #[snafu(display("A valid table suffix template is required for tablesuffix section"))]
673    RequiredTableSuffixTemplate,
674
675    #[snafu(display("Invalid table suffix template, input: {}", input))]
676    InvalidTableSuffixTemplate {
677        input: String,
678        #[snafu(implicit)]
679        location: Location,
680    },
681
682    #[snafu(display("Failed to compile VRL, {}", msg))]
683    CompileVrl {
684        msg: String,
685        #[snafu(implicit)]
686        location: Location,
687    },
688
689    #[snafu(display("Failed to execute VRL, {}", msg))]
690    ExecuteVrl {
691        msg: String,
692        #[snafu(implicit)]
693        location: Location,
694    },
695
696    #[snafu(display("Float is not a number: {}", input_float))]
697    FloatNaN {
698        input_float: f64,
699        #[snafu(implicit)]
700        location: Location,
701    },
702
703    #[snafu(display("Invalid timestamp value: {}", input))]
704    InvalidTimestamp {
705        input: String,
706        #[snafu(implicit)]
707        location: Location,
708    },
709
710    #[snafu(display("Failed to convert bytes to utf8"))]
711    BytesToUtf8 {
712        #[snafu(source)]
713        error: std::string::FromUtf8Error,
714        #[snafu(implicit)]
715        location: Location,
716    },
717
718    #[snafu(display("Please don't use regex in Vrl script"))]
719    VrlRegexValue {
720        #[snafu(implicit)]
721        location: Location,
722    },
723
724    #[snafu(display("Vrl script should return `.` in the end"))]
725    VrlReturnValue {
726        #[snafu(implicit)]
727        location: Location,
728    },
729
730    #[snafu(display("Failed to cast type, msg: {}", msg))]
731    CastType {
732        msg: String,
733        #[snafu(implicit)]
734        location: Location,
735    },
736
737    #[snafu(display("Failed to build DataFusion logical plan"))]
738    BuildDfLogicalPlan {
739        #[snafu(source)]
740        error: datafusion_common::DataFusionError,
741        #[snafu(implicit)]
742        location: Location,
743    },
744
745    #[snafu(display("Failed to execute internal statement"))]
746    ExecuteInternalStatement {
747        #[snafu(source)]
748        source: query::error::Error,
749        #[snafu(implicit)]
750        location: Location,
751    },
752
753    #[snafu(display("Failed to create dataframe"))]
754    DataFrame {
755        #[snafu(source)]
756        source: query::error::Error,
757        #[snafu(implicit)]
758        location: Location,
759    },
760
761    #[snafu(display("General catalog error"))]
762    Catalog {
763        #[snafu(source)]
764        source: catalog::error::Error,
765        #[snafu(implicit)]
766        location: Location,
767    },
768
769    #[snafu(display("Failed to create table"))]
770    CreateTable {
771        #[snafu(source)]
772        source: operator::error::Error,
773        #[snafu(implicit)]
774        location: Location,
775    },
776
777    #[snafu(display("Invalid pipeline version format: {}", version))]
778    InvalidPipelineVersion {
779        version: String,
780        #[snafu(implicit)]
781        location: Location,
782    },
783
784    #[snafu(display("Invalid custom time index config: {}, reason: {}", config, reason))]
785    InvalidCustomTimeIndex {
786        config: String,
787        reason: String,
788        #[snafu(implicit)]
789        location: Location,
790    },
791
792    #[snafu(display("Pipeline is required for this API."))]
793    PipelineMissing {
794        #[snafu(implicit)]
795        location: Location,
796    },
797}
798
799pub type Result<T> = std::result::Result<T, Error>;
800
801impl ErrorExt for Error {
802    fn status_code(&self) -> StatusCode {
803        use Error::*;
804        match self {
805            CastType { .. } => StatusCode::Unexpected,
806            PipelineTableNotFound { .. } => StatusCode::TableNotFound,
807            InsertPipeline { source, .. } => source.status_code(),
808            CollectRecords { source, .. } => source.status_code(),
809            PipelineNotFound { .. }
810            | InvalidPipelineVersion { .. }
811            | InvalidCustomTimeIndex { .. } => StatusCode::InvalidArguments,
812            MultiPipelineWithDiffSchema { .. } => StatusCode::IllegalState,
813            BuildDfLogicalPlan { .. } | RecordBatchLenNotMatch { .. } => StatusCode::Internal,
814            ExecuteInternalStatement { source, .. } => source.status_code(),
815            DataFrame { source, .. } => source.status_code(),
816            Catalog { source, .. } => source.status_code(),
817            CreateTable { source, .. } => source.status_code(),
818
819            EmptyInputField { .. }
820            | MissingInputField { .. }
821            | InvalidFieldRename { .. }
822            | ProcessorMustBeMap { .. }
823            | ProcessorMissingField { .. }
824            | ProcessorExpectString { .. }
825            | ProcessorUnsupportedValue { .. }
826            | ProcessorKeyMustBeString { .. }
827            | ProcessorFailedToParseString { .. }
828            | ProcessorMustHaveStringKey { .. }
829            | UnsupportedProcessor { .. }
830            | FieldMustBeType { .. }
831            | FailedParseFieldFromString { .. }
832            | FailedToParseIntKey { .. }
833            | FailedToParseInt { .. }
834            | FailedToParseFloatKey { .. }
835            | IntermediateKeyIndex { .. }
836            | CmcdMissingValue { .. }
837            | CmcdMissingKey { .. }
838            | KeyMustBeString { .. }
839            | CsvRead { .. }
840            | CsvNoRecord { .. }
841            | CsvSeparatorName { .. }
842            | CsvQuoteName { .. }
843            | DateParseTimezone { .. }
844            | DateParse { .. }
845            | DateFailedToGetLocalTimezone { .. }
846            | DateFailedToGetTimestamp { .. }
847            | DateInvalidFormat { .. }
848            | DissectInvalidPattern { .. }
849            | DissectEmptyPattern { .. }
850            | DissectSplitExceedsInput { .. }
851            | DissectSplitNotMatchInput { .. }
852            | DissectConsecutiveNames { .. }
853            | DissectNoMatchingPattern { .. }
854            | DissectModifierAlreadySet { .. }
855            | DissectAppendOrderAlreadySet { .. }
856            | DissectOrderOnlyAppend { .. }
857            | DissectOrderOnlyAppendModifier { .. }
858            | DissectEndModifierAlreadySet { .. }
859            | EpochInvalidResolution { .. }
860            | GsubPatternRequired { .. }
861            | GsubReplacementRequired { .. }
862            | Regex { .. }
863            | JoinSeparatorRequired { .. }
864            | LetterInvalidMethod { .. }
865            | RegexNamedGroupNotFound { .. }
866            | RegexNoValidField { .. }
867            | RegexNoValidPattern { .. }
868            | UrlEncodingInvalidMethod { .. }
869            | DigestPatternInvalid { .. }
870            | UrlEncodingDecode { .. }
871            | TransformOnFailureInvalidValue { .. }
872            | TransformElementMustBeMap { .. }
873            | TransformTypeMustBeSet { .. }
874            | TransformColumnNameMustBeUnique { .. }
875            | TransformMultipleTimestampIndex { .. }
876            | TransformTimestampIndexCount { .. }
877            | AutoTransformOneTimestamp { .. }
878            | CoerceUnsupportedNullType { .. }
879            | CoerceUnsupportedNullTypeTo { .. }
880            | CoerceUnsupportedEpochType { .. }
881            | CoerceStringToType { .. }
882            | CoerceJsonTypeTo { .. }
883            | CoerceTypeToJson { .. }
884            | CoerceIncompatibleTypes { .. }
885            | ValueInvalidResolution { .. }
886            | ValueParseType { .. }
887            | ValueParseInt { .. }
888            | ValueParseFloat { .. }
889            | ValueParseBoolean { .. }
890            | ValueDefaultValueUnsupported { .. }
891            | ValueUnsupportedYamlType { .. }
892            | ValueYamlKeyMustBeString { .. }
893            | YamlLoad { .. }
894            | YamlParse { .. }
895            | InputValueMustBeObject { .. }
896            | ColumnOptions { .. }
897            | UnsupportedIndexType { .. }
898            | UnsupportedNumberType { .. }
899            | IdentifyPipelineColumnTypeMismatch { .. }
900            | JsonParse { .. }
901            | JsonPathParse { .. }
902            | JsonPathParseResultIndex { .. }
903            | FieldRequiredForDispatcher
904            | TableSuffixRequiredForDispatcherRule
905            | ValueRequiredForDispatcherRule
906            | ReachedMaxNestedLevels { .. }
907            | RequiredTableSuffixTemplate
908            | InvalidTableSuffixTemplate { .. }
909            | CompileVrl { .. }
910            | ExecuteVrl { .. }
911            | FloatNaN { .. }
912            | BytesToUtf8 { .. }
913            | InvalidTimestamp { .. }
914            | VrlRegexValue { .. }
915            | VrlReturnValue { .. }
916            | PipelineMissing { .. } => StatusCode::InvalidArguments,
917        }
918    }
919
920    fn as_any(&self) -> &dyn Any {
921        self
922    }
923}