One suggestion here is instead of using values, we actually create constants for all those error codes...