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