[API] Error Creating Support Ticket


#1

While it doesn’t serve any actual purpose in my plugin, I wanted to see if I could create a support ticket by using the API because I had issues with it from within the user dashboard. Sadly, doing it through the API didn’t work either. I don’t know if this has anything to do with [User Dashboard] Unable to Create Support Tickets, so I’m reporting it just in case. If it does relate to that issue, then hopefully this helps :smiley:

Method Used:

@POST("/shop/{sid}/ticket/open")
CompletableFuture<SupportTicket> createSupportTicket(@Path("sid") String shopId, @Query("from_name") String user_name, @Query("from_email") String user_email, @Query("subject") String subject, @Query("body") String body);

Error Message:

Stack Trace:

02.09 16:38:09 [Server] WARN java.util.concurrent.CompletionException: co.melondev.cubedpay.CubedPayException: Server sent back invalid json:
02.09 16:38:09 [Server] WARN at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
02.09 16:38:09 [Server] WARN at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
02.09 16:38:09 [Server] WARN at java.util.concurrent.CompletableFuture.uniAccept(Unknown Source)
02.09 16:38:09 [Server] WARN at java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown Source)
02.09 16:38:09 [Server] WARN at java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
02.09 16:38:09 [Server] WARN at java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
02.09 16:38:09 [Server] WARN at retrofit2.adapter.java8.Java8CallAdapterFactory$BodyCallAdapter$2.onFailure(Java8CallAdapterFactory.java:114)
02.09 16:38:09 [Server] WARN at retrofit2.OkHttpCall$1.callFailure(OkHttpCall.java:135)
02.09 16:38:09 [Server] WARN at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:118)
02.09 16:38:09 [Server] WARN at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153)
02.09 16:38:09 [Server] WARN at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
02.09 16:38:09 [Server] WARN at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
02.09 16:38:09 [Server] WARN at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
02.09 16:38:09 [Server] WARN at java.lang.Thread.run(Unknown Source)
02.09 16:38:09 [Server] WARN Caused by: co.melondev.cubedpay.CubedPayException: Server sent back invalid json:
02.09 16:38:09 [Server] WARN at co.melondev.cubedpay.envelope.APIEnvelopeTransformerConverter.convert(APIEnvelopeTransformerConverter.java:30)
02.09 16:38:09 [Server] WARN at co.melondev.cubedpay.envelope.APIEnvelopeTransformerConverter.convert(APIEnvelopeTransformerConverter.java:13)
02.09 16:38:09 [Server] WARN at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:122)
02.09 16:38:09 [Server] WARN at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:217)
02.09 16:38:09 [Server] WARN at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:116)
02.09 16:38:09 [Server] WARN ... 5 more

#2

This should be resolved. Thank you!


#3

Thanks for looking into this! I went to go test this for myself, and I found that any page that has to do with support tickets doesn’t work anymore - both my own support tickets and the shop’s help desk.

The ID of the shop I tested this on was shop_vzQnd3CI2Po


#4

Using the same method as above, I got a different error with a similar issue.

Error Message:

Full Stack Trace:

03.09 09:55:07 [Server] WARN java.util.concurrent.CompletionException: co.melondev.cubedpay.CubedPayException: Server sent back invalid json:
03.09 09:55:07 [Server] WARN at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
03.09 09:55:07 [Server] WARN at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
03.09 09:55:07 [Server] WARN at java.util.concurrent.CompletableFuture.uniAccept(Unknown Source)
03.09 09:55:07 [Server] WARN at java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown Source)
03.09 09:55:07 [Server] WARN at java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
03.09 09:55:07 [Server] WARN at java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
03.09 09:55:07 [Server] WARN at retrofit2.adapter.java8.Java8CallAdapterFactory$BodyCallAdapter$2.onFailure(Java8CallAdapterFactory.java:114)
03.09 09:55:07 [Server] WARN at retrofit2.OkHttpCall$1.callFailure(OkHttpCall.java:135)
03.09 09:55:07 [Server] WARN at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:118)
03.09 09:55:07 [Server] WARN at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153)
03.09 09:55:07 [Server] WARN at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
03.09 09:55:07 [Server] WARN at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
03.09 09:55:07 [Server] WARN at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
03.09 09:55:07 [Server] WARN at java.lang.Thread.run(Unknown Source)
03.09 09:55:07 [Server] WARN Caused by: co.melondev.cubedpay.CubedPayException: Server sent back invalid json:
03.09 09:55:07 [Server] WARN at co.melondev.cubedpay.envelope.APIEnvelopeTransformerConverter.convert(APIEnvelopeTransformerConverter.java:30)
03.09 09:55:07 [Server] WARN at co.melondev.cubedpay.envelope.APIEnvelopeTransformerConverter.convert(APIEnvelopeTransformerConverter.java:13)
03.09 09:55:07 [Server] WARN at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:122)
03.09 09:55:07 [Server] WARN at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:217)
03.09 09:55:07 [Server] WARN at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:116)
03.09 09:55:07 [Server] WARN ... 5 more

#5

Hi Bert,

You should find that the UI itself should now be working. I’ll forward your other API issue on to the relevant team.

Thanks
Stuart