better (?) way of handling static errors