mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 14:05:33 +08:00
openapi: better error message on failed parsing #806
This commit is contained in:
parent
aa97395407
commit
ec5dde6442
@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user