I think there are three parts to your question.
Q1) Is there such a thing as a "best rational approximation" to a number given certain constraints to the fraction?
Q2) Is there a way to determine the possible error in such an approximation?
Q3) Can the above be done for $\pi$?
I will attempt to answer the first two of those questions:
A1) Yes. If you know the true value $x$, then you want to minimise the difference between the true value and the estimate $X=\frac pq$.
$$\min_{1 \le q < 10^n , 1\le p<q}\left(|X-x|\right)$$
This looks like a lot of work, searching through all possible fractions, but we can cut down some of the effort by noting that if $\frac pq \approx x$, then $p \approx qx$. We can therefore try to find:
$$\min_{1 \le q < 10^n} \left(\left|\frac {\lfloor qx \rfloor}q -x \right|,\left |\frac {\lceil qx \rceil}q -x \right |\right)$$
This still involves searching through all the possible values of $q$.
A2) For a given value of $n$, the largest possible error is $\frac 1{2(10^n-1)}$, but this only occurs if $x$ is very close to 0 or 1.
A3) The above depends on knowing the true value $x$. If you don't have an approximation for $\pi$ then you can't really answer the question.