[OneSignal Plugin] Error is handled wrongly using missing variable "message"

Forge Component
Published on 7 May by OutSystems R&D
13 votes
Published on 7 May by OutSystems R&D


On PostNotificationJSAction postNotification Fail callback function uses missing variable message when actual error messages are in failedResponse.errors array

function Fail(failedResponse) {


    $parameters.Success = false;

    $parameters.ErrorCode = 1;

    $parameters.ErrorMessage = message;



Should be at least this   $parameters.ErrorMessage = failedResponse.errors[0]

Otherwise there is not actual error on console log but undeclared variable...

Hello Nick.

Nice catch! It will be fixed in the next version.