From e6089ac158ba4b841e276257d5415bb37e1c8d99 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Aug 20 2018 09:53:45 +0000 Subject: Show full error from MBS If the response is not actually JSON, we should still display details. Signed-off-by: Lubomír Sedlář --- diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py index c094e8a..b708abb 100644 --- a/pyrpkg/__init__.py +++ b/pyrpkg/__init__.py @@ -3375,8 +3375,10 @@ class Commands(object): if not resp.ok: try: data = resp.json() - except (KeyError, ValueError): - raise rpkgError('The build failed with an unexpected error') + except ValueError: + raise rpkgError( + 'The build failed with an unexpected error: %s' % resp.text + ) if 'message' in data: error_msg = data['message'] else: