Encode arguments to bytes, decode response from bytes
Move error checking to decorator