openapi: better error message on failed parsing #806

This commit is contained in:
Sören Weber 2024-03-17 00:55:37 +01:00
parent aa97395407
commit ec5dde6442
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -479,7 +479,7 @@ function initOpenapi( update, attrs ){
try{
Object.assign( options, { spec: jsyaml.load( oc.dataset.openapiSpec ) });
} catch( err ){
console.log( err );
console.error( 'OpenAPI: file "' + oc.dataset.openapiUrl + '" could not be parsed as JSON or YAML');
}
}
}