@@ -44,9 +44,9 @@ class LookupWorker extends TerminologyWorker {
4444 try {
4545 await this . handleTypeLevelLookup ( req , res ) ;
4646 } catch ( error ) {
47- console . log ( error ) ;
48- req . logInfo = this . usedSources . join ( "|" ) + " - error" + ( error . msgId ? " " + error . msgId : "" ) ;
4947 this . log . error ( error ) ;
48+ this . debugLog ( error ) ;
49+ req . logInfo = this . usedSources . join ( "|" ) + " - error" + ( error . msgId ? " " + error . msgId : "" ) ;
5050 const statusCode = error . statusCode || 500 ;
5151 const issueCode = error . issueCode || 'exception' ;
5252 return res . status ( statusCode ) . json ( {
@@ -71,8 +71,9 @@ class LookupWorker extends TerminologyWorker {
7171 try {
7272 await this . handleInstanceLevelLookup ( req , res ) ;
7373 } catch ( error ) {
74- req . logInfo = this . usedSources . join ( "|" ) + " - error" + ( error . msgId ? " " + error . msgId : "" ) ;
7574 this . log . error ( error ) ;
75+ this . debugLog ( error ) ;
76+ req . logInfo = this . usedSources . join ( "|" ) + " - error" + ( error . msgId ? " " + error . msgId : "" ) ;
7677 const issueCode = error . issueCode || 'exception' ;
7778 return res . status ( 400 ) . json ( {
7879 resourceType : 'OperationOutcome' ,
@@ -157,8 +158,9 @@ class LookupWorker extends TerminologyWorker {
157158 const result = await this . doLookup ( csProvider , code , txp ) ;
158159 return res . status ( 200 ) . json ( result ) ;
159160 } catch ( error ) {
160- req . logInfo = this . usedSources . join ( "|" ) + " - error" + ( error . msgId ? " " + error . msgId : "" ) ;
161161 this . log . error ( error ) ;
162+ this . debugLog ( error ) ;
163+ req . logInfo = this . usedSources . join ( "|" ) + " - error" + ( error . msgId ? " " + error . msgId : "" ) ;
162164 if ( error instanceof Issue ) {
163165 let oo = new OperationOutcome ( ) ;
164166 oo . addIssue ( error ) ;
@@ -220,8 +222,9 @@ class LookupWorker extends TerminologyWorker {
220222 const result = await this . doLookup ( csProvider , code , txp ) ;
221223 return res . status ( 200 ) . json ( result ) ;
222224 } catch ( error ) {
223- req . logInfo = this . usedSources . join ( "|" ) + " - error" + ( error . msgId ? " " + error . msgId : "" ) ;
224225 this . log . error ( error ) ;
226+ this . debugLog ( error ) ;
227+ req . logInfo = this . usedSources . join ( "|" ) + " - error" + ( error . msgId ? " " + error . msgId : "" ) ;
225228 if ( error instanceof Issue ) {
226229 let oo = new OperationOutcome ( ) ;
227230 oo . addIssue ( error ) ;
0 commit comments