Martin Blanchard pushed to branch master at BuildGrid / buildgrid
Commits:
-
1e86c5ef
by Finn at 2018-09-28T16:32:27Z
1 changed file:
Changes:
... | ... | @@ -154,15 +154,15 @@ class BotSession: |
154 | 154 |
lease = await loop.run_in_executor(None, self._work, self._context, lease)
|
155 | 155 |
|
156 | 156 |
except grpc.RpcError as e:
|
157 |
- self.logger.error("Connection error thrown: [{}]".format(e))
|
|
158 |
- lease.status.code = e.code()
|
|
157 |
+ self.logger.error("RPC error thrown: [{}]".format(e))
|
|
158 |
+ lease.status.CopyFrom(e.code())
|
|
159 | 159 |
|
160 | 160 |
except BotError as e:
|
161 | 161 |
self.logger.error("Internal bot error thrown: [{}]".format(e))
|
162 | 162 |
lease.status.code = code_pb2.INTERNAL
|
163 | 163 |
|
164 | 164 |
except Exception as e:
|
165 |
- self.logger.error("Connection error thrown: [{}]".format(e))
|
|
165 |
+ self.logger.error("Exception thrown: [{}]".format(e))
|
|
166 | 166 |
lease.status.code = code_pb2.INTERNAL
|
167 | 167 |
|
168 | 168 |
self.logger.debug("Work complete: [{}]".format(lease.id))
|