diff --git a/events/code/infrastructure/services/SapphireEventPublishingService.php b/events/code/infrastructure/services/SapphireEventPublishingService.php index 1ad84e2..e6a0321 100644 --- a/events/code/infrastructure/services/SapphireEventPublishingService.php +++ b/events/code/infrastructure/services/SapphireEventPublishingService.php @@ -26,6 +26,6 @@ final class SapphireEventPublishingService implements IEventPublishingService { if(!$parent) throw new NotFoundEntityException('EventHolder',''); $event->setParent($parent); // Should set the ID once the Holder is created... $event->write(); - $event->doPublish(); + //$event->doPublish(); } } \ No newline at end of file diff --git a/events/code/interfaces/restfull_api/EventRegistrationRequestCrudApi.php b/events/code/interfaces/restfull_api/EventRegistrationRequestCrudApi.php index fde4e5d..5d4af51 100644 --- a/events/code/interfaces/restfull_api/EventRegistrationRequestCrudApi.php +++ b/events/code/interfaces/restfull_api/EventRegistrationRequestCrudApi.php @@ -101,9 +101,13 @@ final class EventRegistrationRequestCrudApi return $this->ok(); } catch(NotFoundEntityException $ex1){ - SS_Log::log($ex1,SS_Log::ERR); + SS_Log::log($ex1,SS_Log::WARN); return $this->notFound($ex1->getMessage()); } + catch(EntityValidationException $ex2){ + SS_Log::log($ex2,SS_Log::WARN); + return $this->validationError($ex2->getMessages()); + } catch(Exception $ex){ SS_Log::log($ex,SS_Log::ERR); return $this->serverError(); @@ -118,7 +122,7 @@ final class EventRegistrationRequestCrudApi return $this->ok(EventsAssembler::convertEventRegistrationRequestToArray($request)); } catch(NotFoundEntityException $ex1){ - SS_Log::log($ex1,SS_Log::ERR); + SS_Log::log($ex1,SS_Log::WARN); return $this->notFound($ex1->getMessage()); } catch(Exception $ex){ @@ -135,11 +139,11 @@ final class EventRegistrationRequestCrudApi return $this->updated(); } catch(NotFoundEntityException $ex1){ - SS_Log::log($ex1,SS_Log::ERR); + SS_Log::log($ex1,SS_Log::WARN); return $this->notFound($ex1->getMessage()); } catch (EntityValidationException $ex2) { - SS_Log::log($ex2,SS_Log::ERR); + SS_Log::log($ex2,SS_Log::WARN); return $this->validationError($ex2->getMessages()); } catch(Exception $ex){ @@ -157,9 +161,13 @@ final class EventRegistrationRequestCrudApi return $this->updated(); } catch(NotFoundEntityException $ex1){ - SS_Log::log($ex1,SS_Log::ERR); + SS_Log::log($ex1,SS_Log::WARN); return $this->notFound($ex1->getMessage()); } + catch(EntityValidationException $ex2){ + SS_Log::log($ex2,SS_Log::WARN); + return $this->validationError($ex2->getMessages()); + } catch(Exception $ex){ SS_Log::log($ex,SS_Log::ERR); return $this->serverError();