MCPcopy Create free account
hub / github.com/dropbox/dropbox-sdk-python / PollError

Class PollError

dropbox/async_.py:185–232  ·  view source on GitHub ↗

Error returned by methods for polling the status of asynchronous job. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. :ivar async.PollError.inval

Source from the content-addressed store, hash-verified

183PollEmptyResult_validator = bv.Union(PollEmptyResult)
184
185class PollError(bb.Union):
186 """
187 Error returned by methods for polling the status of asynchronous job.
188
189 This class acts as a tagged union. Only one of the ``is_*`` methods will
190 return true. To get the associated value of a tag (if one exists), use the
191 corresponding ``get_*`` method.
192
193 :ivar async.PollError.invalid_async_job_id: The job ID is invalid.
194 :ivar async.PollError.internal_error: Something went wrong with the job on
195 Dropbox's end. You'll need to verify that the action you were taking
196 succeeded, and if not, try again. This should happen very rarely.
197 """
198
199 _catch_all = 'other'
200 # Attribute is overwritten below the class definition
201 invalid_async_job_id = None
202 # Attribute is overwritten below the class definition
203 internal_error = None
204 # Attribute is overwritten below the class definition
205 other = None
206
207 def is_invalid_async_job_id(self):
208 """
209 Check if the union tag is ``invalid_async_job_id``.
210
211 :rtype: bool
212 """
213 return self._tag == 'invalid_async_job_id'
214
215 def is_internal_error(self):
216 """
217 Check if the union tag is ``internal_error``.
218
219 :rtype: bool
220 """
221 return self._tag == 'internal_error'
222
223 def is_other(self):
224 """
225 Check if the union tag is ``other``.
226
227 :rtype: bool
228 """
229 return self._tag == 'other'
230
231 def _process_custom_annotations(self, annotation_type, field_path, processor):
232 super(PollError, self)._process_custom_annotations(annotation_type, field_path, processor)
233
234PollError_validator = bv.Union(PollError)
235

Callers 1

async_.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected