RPC server: explicitly handle sentry exception capture
The error handler for RPC server classes is used for both unexpected
exceptions (using a 5xx status code), and exceptions used for the normal
execution flow, which are encoded on the server side, and decoded to be
raised again on the client side (and use a 4xx status code). We only
record sentry errors for the 5xx class exceptions.