Interceptor handling custom errors