There are two common criteria for comparing accuracy for filter approximations: least squares and peak error.
For either we determine the error between the two by subtracting their complex result $E(\omega) = H_1(\omega) - H_2(\omega)$ over the frequency range of interest where $H_1(\omega)$ and $H_2(\omega)$ represent each filters complex response (not in dB!).
From that the error criteria for least squares or peak error which can then be compared to other implementations is determined as follows:
Least Squares: $$\int|E(\omega)|^2d\omega$$
Peak Error: $$\max|E(\omega)|$$
For practical determination of least squares in the OP's case, I would suggest a discrete approximation over $N$ with $k=1...N-1$ samples in the frequency response in steps of $\Delta \omega$ using the following, providing an rms error result:
$$\epsilon_{rms}= \sqrt{\frac{1}{N}\sum_k |E(k \Delta \omega)|^2}$$
If only the magnitude response is of interest, the the error function can be modified to be:
$$E(\omega) = |H_1(\omega)| - |H_2(\omega)|$$
And if preference is given to either passband or stopband, weighting factors can be added. Ultimately the two common linear phase FIR optimum filter design algorithms, least squares and Parks-McClellan, will design FIR filters to target responses in the passband and stopbands providing the solution that would minimize the least squares and peak error respectively. Least squares filter coefficients can be readily computed using firls in MATLAB, Octave and Python scipy.signal, and Parks-McClellan can be computed using firpm in MATLAB and remez in Octave and Python scipy.signal.