File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " oc-client-browser" ,
3- "version" : " 2.1.4 " ,
3+ "version" : " 2.1.5 " ,
44 "description" : " OC browser client" ,
55 "main" : " index.js" ,
66 "types" : " index.d.ts" ,
Original file line number Diff line number Diff line change @@ -602,6 +602,10 @@ export function createOc(oc) {
602602 )
603603 . then ( handleFetchResponse )
604604 . then ( ( apiResponse ) => {
605+ if ( apiResponse . error ) {
606+ throw apiResponse ;
607+ }
608+
605609 let template = apiResponse . template ;
606610 apiResponse . data . id = ocId ;
607611 apiResponse . data . element = element ;
@@ -631,6 +635,7 @@ export function createOc(oc) {
631635 retries [ href ] = 0 ;
632636 }
633637 logError ( MESSAGES_ERRORS_RETRIEVING ) ;
638+ window . oc . events . fire ( "oc:error" , err ) ;
634639 retry (
635640 href ,
636641 ( requestNumber ) => {
You can’t perform that action at this time.
0 commit comments