lucifer2732
lucifer2732
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
No description
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
Hi @bartoszherba , We haven't customized extensively, yet we've encountered this issue persistently since the beginning. Our data retrieval from CommerceTools relies on GraphQL queries. The default method for logging in users is LoginCustomer, sourced from the unified module. And all these are predefined things from storefront side.
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
Yeah sure @rohrig , Thanks🙂
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
Hi @bartoszherba, @rohrig , I upgraded my middleware version to 3.8.0 but I am still seeing the same issue in my local.
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
Is this a updated version or do i need to upgrade my version ? If I should upgrade to latest version, can you help me with upgrade command.
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
No description
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
Is this the correct command for verifying the middleware version? npm show @vue-storefront/middleware version . if it is true then my version of middleware is 3.8.0
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
Upon receiving a response containing an error message in its body, the message is transmitted from the commerce platform to the middleware. Within the middleware, the predefined error handler registers the message as a GraphQL error and logs it in the middleware console. Subsequently, the response fails to propagate to the client application browser. Consequently, throughout the process, the request in the network tab remains indefinitely pending, neither displaying a success nor failure status.
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
core
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
In my local setup, I noticed that when a commerce platform generates a response containing an error message in its body, that response is forwarded to the middleware. However, the middleware fails to relay the received response back to the Next.js application. As a result, the request remains pending in the application browser. Consequently, I believe implementing this customized error handler could resolve the issue.
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
Hi @bartoszherba , The customized error handler in middleware.config file is ineffective at capturing GraphQL errors specifically. Instead, it successfully intercepts errors such as network errors and syntax errors. It appears that the predefined default error handler manages GraphQL errors upon reception.
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
integrations : { commerce : { ...getCommerceConfig(INTEGRATION), extensions:(extensions)=>[...extensions], errorHandler:(error:Unknown,req:Request,res:Response)=>{ console.log(error) } } AnotherIntegrationName : { ...getCommerceConfig(INTEGRATION) extensions:(extensions)=>[...extensions,{custom extensions}], errorHandler:(error:Unknown,req:Request,res:Response)=>{ console.log(error) }
} }
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
Hi @bartoszherba , First of all Thanks. It worked but not in all cases. In one scenario where at the time of log in i am using the unified API . In that case ,this error handler is not getting invoked at all and instead of my customized error handler it is using old error handling mechanism .
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
Hi @bartoszherba , my version in same as what you mentioned which is 3.1.0 . When I tried to add logger inside of error Handler i am not seeing anything logged in terminal.
43 replies
AAlokai
Created by valerii.f on 1/15/2024 in #🙋|general-help
SDK error handling
Hi @bartoszherba , @rohrig , I am also getting the same issue when i try to add error handler in my configuration file. Can you help us where we are going wrong. Thanks!
43 replies