public async Task <IHttpActionResult> GetStatus(int auftragsid)
        {
            Log.Information("Received GetStatus call for order with id {auftragsid}.", auftragsid);
            if (!ApiKeyChecker.IsCorrect(Request))
            {
                return(Unauthorized());
            }

            try
            {
                var orderItems = await messageBusCallHelper.FindOrderItems(new[] { auftragsid });

                if (orderItems.Length == 0)
                {
                    return(StatusCode(HttpStatusCode.NotFound));
                }

                Log.Information("Returned status for order with id {auftragsid}.", auftragsid);
                return(Ok(orderItems[0].Status.ToString()));
            }
            catch (Exception e)
            {
                Log.Error(e, "Unexpected error while getting status for order with id {auftragsid}", auftragsid);
                return(InternalServerError(e));
            }
        }
        public async Task <IHttpActionResult> GetStatus(int auftragsid)
        {
            if (!ApiKeyChecker.IsCorrect(Request))
            {
                return(Unauthorized());
            }

            try
            {
                var orderItems = await messageBusCallHelper.FindOrderItems(new[] { auftragsid });

                if (orderItems.Length == 0)
                {
                    return(StatusCode(HttpStatusCode.NotFound));
                }

                return(Ok(orderItems[0].Status.ToString()));
            }
            catch (Exception e)
            {
                return(InternalServerError(e));
            }
        }