rpcserver: log the request if there is an error

When calling a method if the request fails it is handy to be able to
log the request which caused the error to aid in debugging.