Any question ? #3
Replies: 1 comment 2 replies
-
How do you detect errors with socketio methods? For a call like: var sessionInfo = await _picServer.scketio.get(serviceName: "sessions", objectId: sessionId); If the session is found a list is returned with the object JSON in sessionInfo[1]. Session join info: [null, {_id: 5ff9e945189544aabbdc940f, description: , invited_users: [], muted_users: [], active_users: [], name: 7239611028, images_dir: ./data/7239611028, creator_email: [email protected], creator_id: 5ff8c19e4d3f7b8c218e8240, createdAt: 2021-01-09T17:35:01.813Z, updatedAt: 2021-01-09T17:35:01.813Z, __v: 0}] For invalid objectId values a JsonMap is returned. {name: NotFound, message: No record found for id '5ff9e945189544aabbdc940e', code: 404, className: not-found, errors: {}} What is the best way to check for success/failure from these API calls? Thanks, Kevin |
Beta Was this translation helpful? Give feedback.
-
Welcome at flutter_feathersjs.
Ask here please, any question about how to do thing.
Beta Was this translation helpful? Give feedback.
All reactions