Skip to content

Commit

Permalink
fixes error strings
Browse files Browse the repository at this point in the history
  • Loading branch information
memen45 committed Nov 20, 2020
1 parent 187eaa2 commit 0cd15bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions source/AmpacheError.mc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ class AmpacheError extends SubMusic.ApiError {
d_msg = msg;
}

function shortString() {
return SubMusic.ApiError.shortString() + " " + d_code;
}

function toString() {
return d_msg;
}

function code() {
return d_code;
}
Expand Down
4 changes: 4 additions & 0 deletions source/SubsonicError.mc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ class SubsonicError extends SubMusic.ApiError {
return SubMusic.ApiError.shortString() + " " + d_code;
}

function toString() {
return d_msg;
}

static function is(responseCode, data) {

// subsonic API errors have http code 200
Expand Down

0 comments on commit 0cd15bc

Please sign in to comment.