Blazewardog pointed out that I was using the wrong return value for the RPC response.
Found that I hadn't finished implementing the bytes to string method. Finished that.