nikeee / node-jodel-api

Node.js Jodel API
GNU General Public License v3.0
32 stars 3 forks source link

cant post a post #13

Closed guitar9 closed 6 years ago

guitar9 commented 6 years ago

What is here wrong? this does not work to make a post...

client.post(
            "hallo",
            "FF9908" ,
            {
                city: "berlin",
                country: "DE",
                locAccuracy: 10,
                locCoordinates: {
                    lat: 52.520008,
                    lng: 13.404954
                }
            }
        )
nikeee commented 6 years ago

Are there any arror messages? Maybe there is some authentication missing.

guitar9 commented 6 years ago

this is the error Output:

Karma: 100
(node:10754) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): [object Object]
(node:10754) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
nikeee commented 6 years ago

Could you catch the exception and post the error?

guitar9 commented 6 years ago
try {
            await client.post(
                "hallo",
                "FF9908",
                {
                    city: "Munich",
                    country: "DE",
                    locAccuracy: 10,
                    locCoordinates: {
                        lat: 48.137154,
                        lng: 11.576124
                    }
                }
            )
        } catch (err) {
            console.log('=============ERROR LOG=======================');
            console.log(err);
            console.log('====================================');
        }

OUTPUT

=============ERROR LOG=======================
{ code: 478, text: 'unknown', content: '478' }
====================================
nikeee commented 6 years ago

This is related to the missing GCM verification and currently not supported. See: https://github.com/nikeee/node-jodel-api/issues/12