Ensure proper encoding of error messages

[?]
Oct 3, 2013, 3:20 PM
2MSFKTD5BSZSAYUYVETLZW2GAH65CFUYWWNTQCT3LBBCJGGWPHEQC

Dependencies

  • [2] 7G7QH3IT Set a 500 HTTP status on errors
  • [3] LSZLZHJY Allow users to edit their own settings
  • [4] 2JQ7WEFM
  • [5] SMM4HQTP * Put actions related to builds under /build (e.g. /log/<buildid>
  • [6] NYC3LZKH * Generate NAR archives on the fly. Necessary for producing channels
  • [7] AGQ2MGFE Clean up error handling
  • [8] LZVO64YG Merge in the first bits of the API work
  • [9] KYSBJAYN Allow dashes in jobset input names
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] XE6HD7BP Provide the nix-cache-info file required by the binary cache substituter

Change contents

  • edit in src/lib/Hydra/Controller/Root.pm at line 11
    [12.17]
    [4.0]
    use Encode;
  • edit in src/lib/Hydra/Controller/Root.pm at line 215
    [4.403]
    [3.6]
    my @errors = map { encode_utf8($_); } @{$c->error};
  • replacement in src/lib/Hydra/Controller/Root.pm at line 218
    [3.43][3.43:144]()
    if (scalar @{$c->error}) {
    $c->stash->{json}->{error} = join "\n", @{$c->error};
    [3.43]
    [3.144]
    if (scalar @errors) {
    $c->stash->{json}->{error} = join "\n", @errors;
  • replacement in src/lib/Hydra/Controller/Root.pm at line 228
    [4.1669][4.1669:1710]()
    $c->stash->{errors} = $c->error;
    [4.1669]
    [2.0]
    $c->stash->{errors} = [@errors];