File tree Expand file tree Collapse file tree 5 files changed +31
-3
lines changed Expand file tree Collapse file tree 5 files changed +31
-3
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version" : " 0.2.0" ,
6
+ "configurations" : [
7
+ {
8
+ "name" : " Launch Demo via NPM" ,
9
+ "request" : " launch" ,
10
+ "runtimeArgs" : [
11
+ " start"
12
+ ],
13
+ "runtimeExecutable" : " npm" ,
14
+ "skipFiles" : [
15
+ " <node_internals>/**"
16
+ ],
17
+ "type" : " node"
18
+ }
19
+ ]
20
+ }
Original file line number Diff line number Diff line change @@ -144,6 +144,10 @@ export abstract class Demo {
144
144
let generationResult : OMRResponse = null ;
145
145
while ( true ) {
146
146
generationResult = await this . generateApi . getGenerateTemplate ( id ) ;
147
+
148
+ if ( generationResult . responseStatusCode == "Error" ) {
149
+ throw new Error ( generationResult . error . messages [ 0 ] ) ;
150
+ }
147
151
148
152
if ( generationResult . responseStatusCode == "Ok" ) {
149
153
break ;
@@ -195,6 +199,10 @@ export abstract class Demo {
195
199
while ( true ) {
196
200
recognitionResult = await this . recognizeApi . getRecognizeTemplate ( id ) ;
197
201
202
+ if ( recognitionResult . responseStatusCode == "Error" ) {
203
+ throw new Error ( recognitionResult . error . messages [ 0 ] ) ;
204
+ }
205
+
198
206
if ( recognitionResult . responseStatusCode == "Ok" ) {
199
207
break ;
200
208
}
Original file line number Diff line number Diff line change 11
11
"author" : " " ,
12
12
"license" : " ISC" ,
13
13
"devDependencies" : {
14
- "typescript" : " ^4.7.4 "
14
+ "typescript" : " ^5.6 "
15
15
},
16
16
"dependencies" : {
17
17
"@testdeck/mocha" : " ^0.2.0" ,
Original file line number Diff line number Diff line change 15
15
*/
16
16
17
17
import { OMRResponse } from '../model/OMRResponse' ;
18
- import { OmrRecognizeTask } from '../model/OmrRecognizeTask ' ;
18
+ import { OmrRecognizeTask } from '../model/OMRRecognizeTask ' ;
19
19
import { ApiClient } from '../ApiClient' ;
20
20
21
21
export class RecognizeTemplate {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import { expect } from 'chai';
20
20
import { Common } from "./Common" ;
21
21
import { ApiClient } from "../src/ApiClient" ;
22
22
import { RecognizeTemplate } from "../src/api/recognizeTemplate" ;
23
- import { OmrRecognizeTask } from "../src/model/OmrRecognizeTask " ;
23
+ import { OmrRecognizeTask } from "../src/model/OMRRecognizeTask " ;
24
24
import { OMRResponse } from "../src/model/OMRResponse" ;
25
25
import fs from "fs" ;
26
26
import path from "path" ;
You can’t perform that action at this time.
0 commit comments