Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • I understand. But what about error handling (and reporting) to the clients in this scenario? Commented Jun 2, 2016 at 9:15
  • I mean, how do I report back to REST clients errors which occur when handling the UserCreated event (for example, duplicate username or email or database outage). Commented Jun 2, 2016 at 10:09
  • It depends on where you're performing the action. If you're inside the user system, you can do all your validation, writing to data store there, then publish the event. Otherwise, I see it as perfectly acceptable to perform a standard HTTP request to the /users/ endpoint, and allow that system to publish its event if it succeeded, and respond to the request with the new entity Commented Jun 2, 2016 at 10:40