Add decode segment errors

* Specify whether error in heading or string
* Add test cases
* TODO: Refactor errors & tests

Notes:

Think this is a good idea, since I'm always having to manually run base64.urlsafe_b64decode / json.loads to see what went wrong.