Fix bug, formatError was not injected properly.