Add typed errors for known error types

Structured the errors a bit more so the caller can type switch on the error to find out what kind of error it it.

Also add response error names as constants so the caller can string match again constants.