Es mejor pecar de precavido.

English Translation

It’s better to err on the side of caution.

Isn’t pecar more about sinning? to commit a sin? not an error?

Although it is one of the meanings, it is not the only one. It can also mean, exceed oneself in something (see RAE’s dicctionnary pecar, or the Wiktionary in spanish, as the english entry doesn’t seem to have that entry). So here “pecar de precavido” would be “to be exceedingly cautious”.