-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Callback for error messages #96
Comments
I agree with "callback" - however string/json message does not seem right. I think we should raise an ApplicationException and the said callback would accept this exception. User may listen for that event. What do you think? |
Ohh - it's related to gitter chat. Information is being received to "notification handler". I am not sure if we expose those events to user. ...or - simply - we can just expose onNotificationEvent() callback with 2 arguments (NotificationType which is enum: UserError, ServerInfo, etc.etc) and 2nd arg as notification that we received - I like this approach better. From what I see - it's slightly misleading, in AccountInfoHandler method is named onOrderNotification(), should be renamed to onNotification(), and we could parse the notifications there (extract type of notification) -- mb |
At the moment we do:
to detect error messages. I could not find a generic format for error messages in the documentation. So, I'm not sure how to handle/parse these messages. We could put the messages in the exception as a string, but then the user still has to take care of the parsing. I also like the |
Ohh - there is already a method exposed: (should be renamed to onMyNotification maybe? -- "my" is related to current AccountInfo - not general) from what I see - we currently provide 2 args - (account), (order) - which is wrong in current scenario. I cannot check the documentation atm, will do in the evening and come back with proper possible solution. Talk back soon |
I am actually having problems with this issue, I can not find the way to get the info coming though AccountInfoHandler and actually ( did not see other solution ) looks like the only way to get the error, with clientId and error description. I also think that onNotificationEvent could help is this type of cases, could be ok if I push a fix for that ? |
What exactly are you trying to get an event of? Account info related consists of: Position snapshot What are you missing? Your solution will cause spamming (bad) and duplication (bad) of all types of events on "account info" in "raw/untyped" (=java.util.String) manner (very bad). EDIT: EDIT2: |
This issue has been automatically marked as stale due to lack of activity. You can remove the stale label or comment. Otherwise, this issue will be closed in 7 days. Thank you! |
At the moment, all channel related errors are only logged in AccountInfoHandler:111. There should be a callback to receive all errors as a string or a JSON message..
The text was updated successfully, but these errors were encountered: