Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

Creating webhook only works sometimes by Frank

$
0
0

Hi,

My app creates a webhook as part of the registration process:

        WebhooksService whs = shopifyClient.constructService(WebhooksService.class);        

        Webhook wh = new Webhook();

        wh.setAddress(WEBHOOK_ORDERS_ADDRESS);

        wh.setFormat("json");

        wh.setTopic("orders/create");

        whs.createWebhook(wh);    

The last line is line number 753 where the exception occurs.

Sometimes this works fine (all the shops I test with and some real shops as well), but them sometimes when other shops try to signup, then there is an exception:

The exception in the log:

Execution exception (In /app/controllers/Shopify.java around line 753)
HttpException occured : Unprocessable Entity

play.exceptions.JavaExecutionException: Unprocessable Entity
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:237)
    at Invocation.HTTP Request(Play!)
Caused by: org.codegist.crest.HttpException: Unprocessable Entity
    at org.codegist.crest.HttpClientRestService.exec(HttpClientRestService.java:118)
    at org.codegist.crest.DefaultCRest$RestInterfacer.doInvoke(DefaultCRest.java:93)
    at org.codegist.common.reflect.ObjectMethodsAwareInvocationHandler.invoke(ObjectMethodsAwareInvocationHandler.java:42)
    at org.codegist.common.reflect.JdkProxyFactory$DelegatorHandler.invoke(JdkProxyFactory.java:50)
    at com.sun.proxy.$Proxy45.createWebhook(Unknown Source)
    at controllers.Shopify.provisionNewShop(Shopify.java:753)
    at controllers.Shopify.finalizeRegistration(Shopify.java:128)
    at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:557)
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:508)
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:484)
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:479)
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161)

 

Any ideas why this might be happening?

Thanks

Frank

 

 


Viewing all articles
Browse latest Browse all 25503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>