Project

General

Profile

Actions

Bug #11299

closed

There is no correct error handling in rpkg

Added by Nicolas CHARLES over 6 years ago. Updated almost 4 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Packaging
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Small
Priority:
0
Name check:
Fix check:
Regression:

Description

When something goes bad when installing a Rudder plugin, all we get is a nasty stacktrace, like

Traceback (most recent call last):
  File "/opt/rudder/bin/rudder-pkg", line 331, in <module>
    install_file(args['<package.rpkg>'])
  File "/opt/rudder/bin/rudder-pkg", line 239, in install_file
    metadata = rpkg_metadata(package_file)
  File "/opt/rudder/bin/rudder-pkg", line 117, in rpkg_metadata
    return json.loads(output)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 10 column 3 (char 231)

There's no way it helps in any way the user to understand what is going on, and it looks terrible

Actions

Also available in: Atom PDF