Giter Club home page Giter Club logo

Comments (13)

yepher avatar yepher commented on September 19, 2024

Are you using version v0.15?

Do you know how to reproduce that?

Are you seeing it often or has it only happened once?

from java-sparkpost.

carmudgeon avatar carmudgeon commented on September 19, 2024

At least 4 times, and no, i don't have the way to reproduce it.

from java-sparkpost.

yepher avatar yepher commented on September 19, 2024

Ok, thanks for reporting it. I will look into it.

from java-sparkpost.

yepher avatar yepher commented on September 19, 2024

@carmudgeon,

Are you still seeing this NPE? I think I've narrowed down the source of this error some but want to see if you are still seeing the problem.

from java-sparkpost.

carmudgeon avatar carmudgeon commented on September 19, 2024

it occurred twice yesterday 27/04/2016 same stacktrace, i managed to catch it, but the response will be null so i will not be able to tell if the email was sent or not.

from java-sparkpost.

yepher avatar yepher commented on September 19, 2024

Thanks for the update. I'm trying to understand why this happen. The code change will be to throw a SparkPost exception like it is trying to do anyway but did not just want to add the catch exception quite yet until I can understand it better. I am expecting this is some sort of connection error or the socket is getting dropped for some reason.

I will get a fix out soon.

from java-sparkpost.

kalnik-a-a avatar kalnik-a-a commented on September 19, 2024

@yepher

I am expecting this is some sort of connection error or the socket is getting dropped for some reason.

I believe this error can be reproduced in various ways.
Simple way to reproduce:

RestConnection restConnection = new RestConnection(new Client("YOUR_API_KEY"));
Webhook webhook = new Webhook();
webhook.setName("name with spaces");
ResourceWebhooks.update(restConnection, webhook.getName(), webhook);

Reason: server returns empty response. In my case it was response with 400 code and empty content( conn.getContentLength() == 0).

Btw, ResourceWebhooks.update must use PUT instead of POST =)

from java-sparkpost.

kalnik-a-a avatar kalnik-a-a commented on September 19, 2024

One more way: delete existing webhook. Response with OK status code and empty body. NPE was thrown.

from java-sparkpost.

carmudgeon avatar carmudgeon commented on September 19, 2024

In my case, it was during a transmission

from java-sparkpost.

yepher avatar yepher commented on September 19, 2024

Thank you trying to get to this today.

from java-sparkpost.

yepher avatar yepher commented on September 19, 2024

I've put a fix in a branch

from java-sparkpost.

carmudgeon avatar carmudgeon commented on September 19, 2024

Do you know when is this going to be merged?

from java-sparkpost.

yepher avatar yepher commented on September 19, 2024

Fixed in v0.16.1

from java-sparkpost.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.