File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,6 @@ async function main() {
104104}
105105
106106main ( ) . catch ( ( error ) => {
107- logger . error ( "Failed to start LeetCode MCP Server:" , error ) ;
107+ logger . error ( "Failed to start LeetCode MCP Server: %s " , error ) ;
108108 process . exit ( 1 ) ;
109109} ) ;
Original file line number Diff line number Diff line change @@ -208,9 +208,7 @@ export class LeetCodeCNService implements LeetCodeBaseService {
208208 difficulty : q . difficulty
209209 } ) ) ;
210210 } catch ( e ) {
211- logger . error ( "Error parsing similarQuestions:" , {
212- error : e
213- } ) ;
211+ logger . error ( "Error parsing similarQuestions: %s" , e ) ;
214212 }
215213 }
216214
@@ -359,7 +357,7 @@ export class LeetCodeCNService implements LeetCodeBaseService {
359357 * @returns Promise resolving to the solution detail data
360358 */
361359 async fetchSolutionArticleDetail ( slug : string ) : Promise < any > {
362- const data = await this . leetCodeApi
360+ return await this . leetCodeApi
363361 . graphql ( {
364362 query : SOLUTION_ARTICLE_DETAIL_QUERY ,
365363 variables : {
@@ -369,8 +367,6 @@ export class LeetCodeCNService implements LeetCodeBaseService {
369367 . then ( ( res ) => {
370368 return res . data ?. solutionArticle ;
371369 } ) ;
372- logger . info ( data ) ;
373- return data ;
374370 }
375371
376372 /**
Original file line number Diff line number Diff line change @@ -177,9 +177,7 @@ export class LeetCodeGlobalService implements LeetCodeBaseService {
177177 difficulty : q . difficulty
178178 } ) ) ;
179179 } catch ( e ) {
180- logger . error ( "Error parsing similarQuestions:" , {
181- error : e
182- } ) ;
180+ logger . error ( "Error parsing similarQuestions: %s" , e ) ;
183181 }
184182 }
185183
You can’t perform that action at this time.
0 commit comments