Skip to content

UnhandledPromiseRejectionWarning #8

Description

@ThomasHeinrichSchmidt

I'm trying to use your server.js from a Python script and that seem to be working somehow.
But I do not receive reasonable error handling if something as simple as an unconnected car happens.

Connect to car: Ground Shock
(node:3128) UnhandledPromiseRejectionWarning: TypeError: connectCar(...).then is not a function
    at /home/pi/Projects/AnkiNodeDrive/ankiNodeUtils.js:307:25

I tried to fix it in function getReaderCharacteristic(carName) using a catch() like below but it did not help.

  reject(readerCharacteristic);
  return;
}).catch((error) => {
	// assert.isNotOk(error,'Promise error');
	return;
});

Can you help?
I'm hoping to use your server for driving the cars using a keyboard (WASD + cursor keys :-)
Driving and lights is very nice!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions