error: improve and implement custom error type

Create a new Error type to return custom errors. We also export the new
errors to make the errors comparable.

Another point is to create a new error type instead of using the
"errors" package. This will allow us to extend the errors it in the
future with custom error codes or other private fields.

Signed-off-by: Fatih Arslan <ftharsln@gmail.com>