thedatahub / Datahub-Factory

Datahub::Factory - Transport metadata between Collection Management Systems and the Datahub
Other
2 stars 4 forks source link

Fix concatenation error when a HTTP error is thrown #60

Open netsensei opened 6 years ago

netsensei commented 6 years ago

When a Catmandu::HTTPError is thrown, the message property of the error is an undef. This causes the Flash module to break. We should add code that processes the Catmandu::HTTPError properly.

netsensei commented 6 years ago

This issue is only partly fixed. The code just spits out the response_body property of the Exception. This contains the unprocessed, raw output of the error, which could be anything.

Processing the error properly should be done via the Datahub::Factory module since Datahub::Factory is agnostic about context-specific data structures being passed around.