prooph / event-store-http-client

PHP 7.2 Event Store HTTP Client Implementation
BSD 3-Clause "New" or "Revised" License
25 stars 5 forks source link

Suggestion: Improve ProjectionCommandFailed exception message #39

Closed burzum closed 5 years ago

burzum commented 5 years ago

Would it be possible to either change this message and add a sentence like "Make sure your event store has projections enabled." Or even better throw a "ProjectionsNotEnabled" exception?

Uncaught Prooph\EventStoreHttpClient\Exception\ProjectionCommandFailed: Server returned 404 (Not Found) for GET on /projection/TEST_PROJECTION/result in src\Projections\ProjectionsManager.php:541

prolic commented 5 years ago

We don't get more information than that from the event store server. All we know is that a 404 not found was returned

burzum commented 5 years ago

@prolic maybe add it as a question then to the end of the message? "Has your event store projections enabled?" It's a trap if you're not used to the store and projects. If you don't want to add it just close the ticket.