Project

General

Profile

Task #6043

Story #3944: DataONE Python products

Handle pyxb.UnrecognizedDOMRootNodeError exception

Added by Roger Dahl almost 10 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Target version:
-
Start date:
2014-08-14
Due date:
% Done:

0%

Estimated time:
0.00 h
Story Points:
Sprint:

Description

It is possible for an attempt to deserialize a DataONE type to cause a pyxb.UnrecognizedDOMRootNodeError exception. If that happens, the exception is not caught in d1_common. Client code typically only catches the d1_common.types.exceptions.DataONEException base exception or children and so will crash on pyxb.UnrecognizedDOMRootNodeError. So d1_common should catch pyxb.UnrecognizedDOMRootNodeError and wrap it up as a DataONEException before sending it to the client.

History

#1 Updated by Roger Dahl over 9 years ago

  • Status changed from New to Rejected
  • translation missing: en.field_remaining_hours set to 0.0

This exception is derived from PyXBException, which we're already catching. I investigated this and the cause was that I was using the PyXB CreateFromObject() method directly in my script while I should have been using the deserialize() method on your PyXB exceptions wrapper.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)