Add error formatting option

For the unit test I think we can just stub out this module and test that it gets the params we expect