created HttpExceptions for setting HttpStatusCode which recognize the ApiError middleware