Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better errors for schema merging #607

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
7 changes: 5 additions & 2 deletions typify-impl/src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::type_entry::{
Variant, VariantDetails,
};
use crate::util::{all_mutually_exclusive, recase, ref_key, Case, StringValidator};
use log::{debug, info};
use log::{debug, error, info};
use schemars::schema::{
ArrayValidation, InstanceType, Metadata, ObjectValidation, Schema, SchemaObject, SingleOrVec,
StringValidation, SubschemaValidation,
Expand Down Expand Up @@ -555,7 +555,10 @@ impl TypeSpace {
Ok((type_entry, &None))
}

Err(_) => self.convert_never(type_name, original_schema),
Err(e) => {
error!("Error in convert_schema_object: {:#?}", e);
tormeh marked this conversation as resolved.
Show resolved Hide resolved
self.convert_never(type_name, original_schema)
}
}
}

Expand Down
Loading