addPriceUpdate throws Something went wrong error message

Hi,

I am trying to perform delivery charge price update and getting something went wrong… can you please let me know, what is wrong with this log???

2023-10-13T18:49:37.569+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : → POST https://api.jiox1.de/service/platform/cart/v1.0/company/4/application/64b002e1386bae58f856f06d/price-adjustment
2023-10-13T18:49:37.569+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : Content-Length: 288
2023-10-13T18:49:37.569+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : Authorization: Bearer oa-0cc31092604e494c98397dd60209453a8fd45ac7
2023-10-13T18:49:37.569+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : Content-Type: application/x-www-form-urlencoded
2023-10-13T18:49:37.569+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : x-fp-sdk-version: 1.3.4
2023-10-13T18:49:37.571+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : x-ext-lib-version: java/0.0.49
2023-10-13T18:49:37.571+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : x-fp-date: 20231013T131937Z
2023-10-13T18:49:37.571+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : host: api.jiox1.de
2023-10-13T18:49:37.571+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : x-fp-signature: v1:a7781b36a41b8ff2fa981e47b263990f714d04ef1677277e9fefe70fe8fd15ad
2023-10-13T18:49:37.571+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger :
2023-10-13T18:49:37.571+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : {“value”:40.0,“message”:“Delivery Charges”,“article_level_distribution”:true,“collection”:{“refund_by”:“FYND”,“collected_by”:“FYND”},“type”:“delivery_charge”,“is_authenticated”:true,“article_ids”:[{“value”:40.0,“article_id”:“64ce4b201b79aeb1ced9a571”,“meta”:{“qty”:1}}],“cart_id”:“21497”}
2023-10-13T18:49:37.572+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : → END POST (288-byte body)
2023-10-13T18:49:37.721+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : ← 500 https://api.jiox1.de/service/platform/cart/v1.0/company/4/application/64b002e1386bae58f856f06d/price-adjustment (148ms)
2023-10-13T18:49:37.721+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : date: Fri, 13 Oct 2023 13:19:37 GMT
2023-10-13T18:49:37.721+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : content-type: application/json
2023-10-13T18:49:37.721+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : content-length: 41
2023-10-13T18:49:37.721+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : strict-transport-security: max-age=63072000; includeSubdomains
2023-10-13T18:49:37.721+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : x-content-type-options: nosniff
2023-10-13T18:49:37.721+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : alt-svc:
2023-10-13T18:49:37.721+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : alt-svc: h3=“:443”; ma=2592000,h3-29=“:443”; ma=2592000
2023-10-13T18:49:37.721+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : via: 1.1 google
2023-10-13T18:49:37.721+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger :
2023-10-13T18:49:37.721+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : {“message”:“oops! something went wrong.”}
2023-10-13T18:49:37.721+05:30 DEBUG 23514 — [nio-8080-exec-4] com.sdk.common.FDKLogger : ← END HTTP (41-byte body)
2023-10-13T18:49:37.722+05:30 ERROR 23514 — [nio-8080-exec-4] c.fynd.delfee.controller.CartController : get cart failed with the exception message HTTP responseCode: 500 responseBody :{“message”:“oops! something went wrong.”}

com.sdk.common.model.FDKServerResponseError: HTTP responseCode: 500 responseBody :{“message”:“oops! something went wrong.”}
at com.sdk.platform.cart.CartPlatformService$ApplicationClient.addPriceAdjustment(CartPlatformService.java:710) ~[fdk-client-java-1.3.4.jar:1.3.4]
at com.sdk.platform.cart.CartPlatformService$ApplicationClient.addPriceAdjustment(CartPlatformService.java:695) ~[fdk-client-java-1.3.4.jar:1.3.4]
at com.fynd.delfee.controller.CartController.updateInjection(CartController.java:223) ~[classes/:na]
at com.fynd.delfee.controller.CartController.getCart(CartController.java:121) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:207) ~[spring-web-6.0.3.jar:6.0.3]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:152) ~[spring-web-6.0.3.jar:6.0.3]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) ~[spring-webmvc-6.0.3.jar:6.0.3]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:884) ~[spring-webmvc-6.0.3.jar:6.0.3]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) ~[spring-webmvc-6.0.3.jar:6.0.3]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-6.0.3.jar:6.0.3]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1080) ~[spring-webmvc-6.0.3.jar:6.0.3]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:973) ~[spring-webmvc-6.0.3.jar:6.0.3]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1010) ~[spring-webmvc-6.0.3.jar:6.0.3]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:902) ~[spring-webmvc-6.0.3.jar:6.0.3]
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:705) ~[tomcat-embed-core-10.1.4.jar:6.0]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:884) ~[spring-webmvc-6.0.3.jar:6.0.3]
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:814) ~[tomcat-embed-core-10.1.4.jar:6.0]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:223) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-10.1.4.jar:10.1.4]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-6.0.3.jar:6.0.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.3.jar:6.0.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-6.0.3.jar:6.0.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.3.jar:6.0.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-6.0.3.jar:6.0.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.3.jar:6.0.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:119) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:400) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:859) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1734) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-10.1.4.jar:10.1.4]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

fdk-extension.version – 0.0.49
fdk-client.version – 1.3.4

Can you please share the request logs.

: Cart Qualified for free delivery :false
2023-10-17T16:45:25.451+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : → POST https://api.jiox1.de/service/platform/cart/v1.0/company/4/application/64b002e1386bae58f856f06d/price-adjustment
2023-10-17T16:45:25.451+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : Content-Length: 218
2023-10-17T16:45:25.451+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : Authorization: Bearer oa-90e8e6c1e1b2acb99313e013fbdb876bdd5d05a0
2023-10-17T16:45:25.452+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : Content-Type: application/x-www-form-urlencoded
2023-10-17T16:45:25.452+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : x-fp-sdk-version: 1.3.4
2023-10-17T16:45:25.452+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : x-ext-lib-version: java/0.0.49
2023-10-17T16:45:25.452+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : x-fp-date: 20231017T111525Z
2023-10-17T16:45:25.452+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : host: api.jiox1.de
2023-10-17T16:45:25.452+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : x-fp-signature: v1:84eac2a1507690ebbd2f0a588073007cbd93d0f038d8775bf0e8a4933d15dea2
2023-10-17T16:45:25.452+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger :
2023-10-17T16:45:25.452+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : {“value”:50.0,“message”:“Delivery Charges”,“article_level_distribution”:false,“collection”:{“refund_by”:“FYND”,“collected_by”:“FYND”},“type”:“delivery_charge”,“is_authenticated”:true,“article_ids”:[],“cart_id”:“21497”}
2023-10-17T16:45:25.452+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : → END POST (218-byte body)
2023-10-17T16:45:25.639+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : ← 500 https://api.jiox1.de/service/platform/cart/v1.0/company/4/application/64b002e1386bae58f856f06d/price-adjustment (186ms)
2023-10-17T16:45:25.639+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : date: Tue, 17 Oct 2023 11:15:25 GMT
2023-10-17T16:45:25.639+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : content-type: application/json
2023-10-17T16:45:25.639+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : content-length: 41
2023-10-17T16:45:25.639+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : strict-transport-security: max-age=63072000; includeSubdomains
2023-10-17T16:45:25.639+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : x-content-type-options: nosniff
2023-10-17T16:45:25.639+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : alt-svc:
2023-10-17T16:45:25.639+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : alt-svc: h3=“:443”; ma=2592000,h3-29=“:443”; ma=2592000
2023-10-17T16:45:25.639+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : via: 1.1 google
2023-10-17T16:45:25.639+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger :
2023-10-17T16:45:25.639+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : {“message”:“oops! something went wrong.”}
2023-10-17T16:45:25.639+05:30 DEBUG 6235 — [nio-8080-exec-1] com.sdk.common.FDKLogger : ← END HTTP (41-byte body)
2023-10-17T16:45:25.640+05:30 ERROR 6235 — [nio-8080-exec-1] c.fynd.delfee.controller.CartController : get cart failed with the exception message HTTP responseCode: 500 responseBody :{“message”:“oops! something went wrong.”}

com.sdk.common.model.FDKServerResponseError: HTTP responseCode: 500 responseBody :{“message”:“oops! something went wrong.”}
at com.sdk.platform.cart.CartPlatformService$ApplicationClient.addPriceAdjustment(CartPlatformService.java:710) ~[fdk-client-java-1.3.4.jar:1.3.4]
at com.sdk.platform.cart.CartPlatformService$ApplicationClient.addPriceAdjustment(CartPlatformService.java:695) ~[fdk-client-java-1.3.4.jar:1.3.4]
at com.fynd.delfee.controller.CartController.updateInjection(CartController.java:229) ~[classes/:na]
at com.fynd.delfee.controller.CartController.getCart(CartController.java:125) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]

@Pitchaimani the value of cart_id in request is passed wrong that’s why you’re getting the error with status code 500. You need to pass the value of “id” here. Which will work.

Thanks for quick help @Devendra_Kumari_Dhay . I hope, API Spec just says id as an argument name, hence we got confused. It would be nice, if the API Spec get updated to guide the team to use the right value instead of trying to guess, which one is right and which one is not?