sometimes, request to the the square api create order failed, and ApiException.getErrors() is null. if you can tell me the reason, it’s better. below is the log, maybe it could help your enginner to improve.
00:05.774637438 ERROR c.f.i.log.LogManager - [java.lang.NullPointerException] Cannot invoke “java.util.List.get(int)” because the return value of “com.squareup.square.exceptions.ApiException.getErrors()” is null
java.lang.NullPointerException: Cannot invoke “java.util.List.get(int)” because the return value of “com.squareup.square.exceptions.ApiException.getErrors()” is null
at app.square.integration.client.SquareException.(SquareException.java:55)
at app.square.integration.client.sdk.OrderClient.create(OrderClient.java:68)
at app.square.integration.service.OrderCreationService.create(OrderCreationService.java:77)
at app.square.integration.web.OrderSquareWebServiceImpl.create(OrderSquareWebServiceImpl.java:58)
at core.framework.web.Controller$OrderSquareWebServiceImpl$create$94.execute(Controller$OrderSquareWebServiceImpl$create$94.java)
at core.framework.internal.web.controller.InvocationImpl.proceed(InvocationImpl.java:51)
at app.square.integration.webhook.interceptor.WebhookInterceptor.intercept(WebhookInterceptor.java:31)
at core.framework.internal.web.controller.InvocationImpl.proceed(InvocationImpl.java:58)
at core.framework.internal.web.HTTPHandler.handle(HTTPHandler.java:112)
at core.framework.internal.web.HTTPHandler.handleRequest(HTTPHandler.java:78)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:393)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:859)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
at java.base/java.lang.Thread.run(Unknown Source)
00:05.774756781 c.f.i.w.response.ResponseHandler - [response] statusCode=500
00:05.774757792 c.f.i.w.response.ResponseHandler - [response:header] Content-Type=application/json