Hi Team

We have an application where documents and expenses are approved or rejected. The approvals and rejections are done by manager.While approving or rejecting ,the "500 internal server error" is coming.Could you please let us know why this error is coming.

Error Description:-

Stack trace:-
500 Internal Server Error
   at ss.CcOneSignal.ActionREST_SendPushNotificationToUserId(HeContext heContext, ICcOneSignalCallbacks _callbacks, STSTR_SendPushNotificationToUserIdInputStructure inParamInput, STSTR_SendPushNotificationToUserIdOutputStructure& outParamResponse)
   at ss.Actions.ActionSendPushNotificationToUserId(HeContext heContext, String inParamOneSignalRestAPIKey, String inParamOneSignalAppId, RLContentList inParamMessage, RLContentList inParamSubtitle, STPushNotificationDeeplinkStructure inParamDeepLink, String inParamBigPicture, RLButtonItemList inParamNotificationActions, Int32 inParamUserId, DateTime inParamSendAfter, Int32 inParamiOSBadgeCount, String inParamiOSBadgeType, String inParamSmallIcon, String inParamLargeIcon, Boolean& outParamSuccess, BasicTypeList`1& outParamErrorResponse)
   at ss.MssSendPushNotificationToUserId(HeContext heContext, String inParamOneSignalRestAPIKey, String inParamOneSignalAppId, RecordList inParamMessage, RecordList inParamSubtitle, IRecord inParamDeepLink, String inParamBigPicture, RecordList inParamNotificationActions, Int32 inParamUserId, DateTime inParamSendAfter, Int32 inParamiOSBadgeCount, String inParamiOSBadgeType, String inParamSmallIcon, String inParamLargeIcon, Boolean& outParamSuccess, BasicTypeList`1& outParamErrorResponse)
   at ss.Actions.ActionSendDocumentPushUpNotification(HeContext heContext, Int64 inParamDocumentId)
   at ss.Actions.Action(HeContext heContext, Int64 inParamDocumentId, Int32 inParamAprovedBy)
   at ss.RsseSpaceCrewMember_CS.Mss(HeContext heContext, Int64 inParamDocumentId, Int32 inParamAprovedBy)
   at ss.CsRESTExpose.CsControllerFlows.FlowREST_(HeContext heContext, Int64 inParam, Int32 inParam)
   at ss.CsRESTExpose.CsBASSnet_Documents.CsBASSnet_DocumentsController.FlowBASSnet_DocumentsActionREST_UpdateDocument(Nullable`1 auxinParam, Nullable`1 auxinParam)

Hi Divya


Your application are using OneSignal to push notification when expense approved or rejected.

This error occurred when send push notification to OneSignal.


You'd better temporarily set the logging level to troubleshoot and check the detail of response to identify the root cause.

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/REST/Troubleshoot_a_REST_API#Set_Logging_Level


If this error is random or can not be avoided, your can catch and ignore push notification exception.


Best Regards

Wei

Divya Sharma wrote:

Hi Team

We have an application where documents and expenses are approved or rejected. The approvals and rejections are done by manager.While approving or rejecting ,the "500 internal server error" is coming.Could you please let us know why this error is coming.

Error Description:-

Stack trace:-
500 Internal Server Error
   at ss.CcOneSignal.ActionREST_SendPushNotificationToUserId(HeContext heContext, ICcOneSignalCallbacks _callbacks, STSTR_SendPushNotificationToUserIdInputStructure inParamInput, STSTR_SendPushNotificationToUserIdOutputStructure& outParamResponse)
   at ss.Actions.ActionSendPushNotificationToUserId(HeContext heContext, String inParamOneSignalRestAPIKey, String inParamOneSignalAppId, RLContentList inParamMessage, RLContentList inParamSubtitle, STPushNotificationDeeplinkStructure inParamDeepLink, String inParamBigPicture, RLButtonItemList inParamNotificationActions, Int32 inParamUserId, DateTime inParamSendAfter, Int32 inParamiOSBadgeCount, String inParamiOSBadgeType, String inParamSmallIcon, String inParamLargeIcon, Boolean& outParamSuccess, BasicTypeList`1& outParamErrorResponse)
   at ss.MssSendPushNotificationToUserId(HeContext heContext, String inParamOneSignalRestAPIKey, String inParamOneSignalAppId, RecordList inParamMessage, RecordList inParamSubtitle, IRecord inParamDeepLink, String inParamBigPicture, RecordList inParamNotificationActions, Int32 inParamUserId, DateTime inParamSendAfter, Int32 inParamiOSBadgeCount, String inParamiOSBadgeType, String inParamSmallIcon, String inParamLargeIcon, Boolean& outParamSuccess, BasicTypeList`1& outParamErrorResponse)
   at ss.Actions.ActionSendDocumentPushUpNotification(HeContext heContext, Int64 inParamDocumentId)
   at ss.Actions.Action(HeContext heContext, Int64 inParamDocumentId, Int32 inParamAprovedBy)
   at ss.RsseSpaceCrewMember_CS.Mss(HeContext heContext, Int64 inParamDocumentId, Int32 inParamAprovedBy)
   at ss.CsRESTExpose.CsControllerFlows.FlowREST_(HeContext heContext, Int64 inParam, Int32 inParam)
   at ss.CsRESTExpose.CsBASSnet_Documents.CsBASSnet_DocumentsController.FlowBASSnet_DocumentsActionREST_UpdateDocument(Nullable`1 auxinParam, Nullable`1 auxinParam)


Hi Divya,

Which entity action u are using Update or CreateOrUpdate? If CreateOrUpdate then please try "Update" action only, The issue might be related to the primary id. Make sure the Id you are passing is correct.