public static void ThrowResourceManagementException(ResourceManagementException ex)
        {
            ErrorData e = new v2.ErrorData(ex, "resource-management-exception");

            throw new WebFaultException <Error>(new Error(e), HttpStatusCode.BadRequest);
        }
        public static void ThrowArgumentException(ArgumentException ex)
        {
            ErrorData e = new v2.ErrorData(ex, "bad-request");

            throw new WebFaultException <Error>(new Error(e), HttpStatusCode.BadRequest);
        }
        public static void ThrowPermissionDeniedException(PermissionDeniedException ex)
        {
            ErrorData e = new v2.ErrorData(ex, "permission-denied");

            throw new WebFaultException <Error>(new Error(e), HttpStatusCode.Forbidden);
        }
        public static void ThrowServerException(Exception ex)
        {
            ErrorData e = new v2.ErrorData(ex, "internal-server-error");

            throw new WebFaultException <Error>(new Error(e), HttpStatusCode.InternalServerError);
        }