public object Post(CreateMessage request) { try { CreatingMessage.Create(request); } catch (QueueNotExistsException) { return(new HttpError(HttpStatusCode.NotFound, $"Queue {request.QueueName} not exists")); } catch (BadRequestException) { return(new HttpError(HttpStatusCode.BadRequest, "BadRequest")); } return(new HttpResult(new CreateQueueResponse(), HttpStatusCode.Created)); }