diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/shared/rest/rest-extractor.service.ts | 21 | ||||
-rw-r--r-- | client/yarn.lock | 96 |
2 files changed, 65 insertions, 52 deletions
diff --git a/client/src/app/shared/rest/rest-extractor.service.ts b/client/src/app/shared/rest/rest-extractor.service.ts index b560e2fe4..59dea7880 100644 --- a/client/src/app/shared/rest/rest-extractor.service.ts +++ b/client/src/app/shared/rest/rest-extractor.service.ts | |||
@@ -46,15 +46,18 @@ export class RestExtractor { | |||
46 | console.error('An error occurred:', errorMessage) | 46 | console.error('An error occurred:', errorMessage) |
47 | } else if (err.status !== undefined) { | 47 | } else if (err.status !== undefined) { |
48 | // A server-side error occurred. | 48 | // A server-side error occurred. |
49 | // TODO: remove when angular/angular#19477 (comment) is fixed | 49 | if (err.error) { |
50 | let body = JSON.parse(err.error) | 50 | if (err.error.errors) { |
51 | if (body) { | 51 | const errors = err.error.errors |
52 | if (body.errors) { | 52 | const errorsArray: string[] = [] |
53 | const errors = body.errors | 53 | |
54 | const error = errors[Object.keys(errors)[0]] | 54 | Object.keys(errors).forEach(key => { |
55 | errorMessage = error.msg // Take the message of the first error | 55 | errorsArray.push(errors[key].msg) |
56 | } else if (body.error) { | 56 | }) |
57 | errorMessage = body.error | 57 | |
58 | errorMessage = errorsArray.join('. ') | ||
59 | } else if (err.error.error) { | ||
60 | errorMessage = err.error.error | ||
58 | } | 61 | } |
59 | } | 62 | } |
60 | errorMessage = errorMessage ? errorMessage : 'Unknown error.' | 63 | errorMessage = errorMessage ? errorMessage : 'Unknown error.' |
diff --git a/client/yarn.lock b/client/yarn.lock index bcfcc8dec..b63c76e2f 100644 --- a/client/yarn.lock +++ b/client/yarn.lock | |||
@@ -3,70 +3,70 @@ | |||
3 | 3 | ||
4 | 4 | ||
5 | "@angular/animations@~4.4.0": | 5 | "@angular/animations@~4.4.0": |
6 | version "4.4.4" | 6 | version "4.4.6" |
7 | resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-4.4.4.tgz#a2f9353604347abe15df98292058842f52f08bc2" | 7 | resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-4.4.6.tgz#fa661899a8a4e38cb7c583c7a5c97ce65d592a35" |
8 | dependencies: | 8 | dependencies: |
9 | tslib "^1.7.1" | 9 | tslib "^1.7.1" |
10 | 10 | ||
11 | "@angular/common@~4.4.0": | 11 | "@angular/common@~4.4.0": |
12 | version "4.4.4" | 12 | version "4.4.6" |
13 | resolved "https://registry.yarnpkg.com/@angular/common/-/common-4.4.4.tgz#ae0a818aaa0c6a3f0901e7b80bd94e1c22eb9365" | 13 | resolved "https://registry.yarnpkg.com/@angular/common/-/common-4.4.6.tgz#4b81420724e0828a0e839b95a55eb1a7e83918f2" |
14 | dependencies: | 14 | dependencies: |
15 | tslib "^1.7.1" | 15 | tslib "^1.7.1" |
16 | 16 | ||
17 | "@angular/compiler-cli@~4.4.0": | 17 | "@angular/compiler-cli@~4.4.0": |
18 | version "4.4.4" | 18 | version "4.4.6" |
19 | resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-4.4.4.tgz#063080a497d9175396825050222c717da184f6cf" | 19 | resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-4.4.6.tgz#bafd3d1e260e99087eb9a8cf7532dbd603abb9b1" |
20 | dependencies: | 20 | dependencies: |
21 | "@angular/tsc-wrapped" "4.4.4" | 21 | "@angular/tsc-wrapped" "4.4.6" |
22 | minimist "^1.2.0" | 22 | minimist "^1.2.0" |
23 | reflect-metadata "^0.1.2" | 23 | reflect-metadata "^0.1.2" |
24 | 24 | ||
25 | "@angular/compiler@~4.4.0": | 25 | "@angular/compiler@~4.4.0": |
26 | version "4.4.4" | 26 | version "4.4.6" |
27 | resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-4.4.4.tgz#326eb0029d9a3541aaca124def9adc51c36f2b41" | 27 | resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-4.4.6.tgz#2ee1faf25b757e1d128979074be7fae529b3bc20" |
28 | dependencies: | 28 | dependencies: |
29 | tslib "^1.7.1" | 29 | tslib "^1.7.1" |
30 | 30 | ||
31 | "@angular/core@~4.4.0": | 31 | "@angular/core@~4.4.0": |
32 | version "4.4.4" | 32 | version "4.4.6" |
33 | resolved "https://registry.yarnpkg.com/@angular/core/-/core-4.4.4.tgz#bd37ecf54158f97489996c9386bd222f80a32f5c" | 33 | resolved "https://registry.yarnpkg.com/@angular/core/-/core-4.4.6.tgz#13031fd10dcfe438875419b38f21120958bc2354" |
34 | dependencies: | 34 | dependencies: |
35 | tslib "^1.7.1" | 35 | tslib "^1.7.1" |
36 | 36 | ||
37 | "@angular/forms@~4.4.0": | 37 | "@angular/forms@~4.4.0": |
38 | version "4.4.4" | 38 | version "4.4.6" |
39 | resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-4.4.4.tgz#4db3790509b6b10f1db8a7c1b7f52187cf64cfd4" | 39 | resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-4.4.6.tgz#fe64ace42435c1b80f49034b7c41ce8caf14a44a" |
40 | dependencies: | 40 | dependencies: |
41 | tslib "^1.7.1" | 41 | tslib "^1.7.1" |
42 | 42 | ||
43 | "@angular/http@~4.4.0": | 43 | "@angular/http@~4.4.0": |
44 | version "4.4.4" | 44 | version "4.4.6" |
45 | resolved "https://registry.yarnpkg.com/@angular/http/-/http-4.4.4.tgz#667faf616bb624168eafae6ee92e5eba23a9d1f2" | 45 | resolved "https://registry.yarnpkg.com/@angular/http/-/http-4.4.6.tgz#0af680c6710bdc026d940e225cfd0f6a5c005d0c" |
46 | dependencies: | 46 | dependencies: |
47 | tslib "^1.7.1" | 47 | tslib "^1.7.1" |
48 | 48 | ||
49 | "@angular/platform-browser-dynamic@~4.4.0": | 49 | "@angular/platform-browser-dynamic@~4.4.0": |
50 | version "4.4.4" | 50 | version "4.4.6" |
51 | resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-4.4.4.tgz#c3c9eb854a528556a07054127932e527fa932e14" | 51 | resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-4.4.6.tgz#4d3d9a6a7bf2cf3de4058a615ae059eff641fa36" |
52 | dependencies: | 52 | dependencies: |
53 | tslib "^1.7.1" | 53 | tslib "^1.7.1" |
54 | 54 | ||
55 | "@angular/platform-browser@~4.4.0": | 55 | "@angular/platform-browser@~4.4.0": |
56 | version "4.4.4" | 56 | version "4.4.6" |
57 | resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-4.4.4.tgz#a3898e2e7ba9d84ffa0d47144c6971179c75aee6" | 57 | resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-4.4.6.tgz#a9839c547e1b654fa1d24a89780c8ba6ab8dcce0" |
58 | dependencies: | 58 | dependencies: |
59 | tslib "^1.7.1" | 59 | tslib "^1.7.1" |
60 | 60 | ||
61 | "@angular/router@~4.4.0": | 61 | "@angular/router@~4.4.0": |
62 | version "4.4.4" | 62 | version "4.4.6" |
63 | resolved "https://registry.yarnpkg.com/@angular/router/-/router-4.4.4.tgz#7be391096e843cb3e04f9f05d1d65a88df9bc7cf" | 63 | resolved "https://registry.yarnpkg.com/@angular/router/-/router-4.4.6.tgz#0f6ad29ae0ff8d2c9ea379bd320447217b7ec866" |
64 | dependencies: | 64 | dependencies: |
65 | tslib "^1.7.1" | 65 | tslib "^1.7.1" |
66 | 66 | ||
67 | "@angular/tsc-wrapped@4.4.4": | 67 | "@angular/tsc-wrapped@4.4.6": |
68 | version "4.4.4" | 68 | version "4.4.6" |
69 | resolved "https://registry.yarnpkg.com/@angular/tsc-wrapped/-/tsc-wrapped-4.4.4.tgz#9841821e55616b826ca160250fe85e15fc74ffc3" | 69 | resolved "https://registry.yarnpkg.com/@angular/tsc-wrapped/-/tsc-wrapped-4.4.6.tgz#16787cbbf50bdc7e738123b19c32527f244e178d" |
70 | dependencies: | 70 | dependencies: |
71 | tsickle "^0.21.0" | 71 | tsickle "^0.21.0" |
72 | 72 | ||
@@ -107,8 +107,8 @@ | |||
107 | resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.25.tgz#66ecaf4df93f5281b48427ee96fbcdfc4f0cdce1" | 107 | resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.25.tgz#66ecaf4df93f5281b48427ee96fbcdfc4f0cdce1" |
108 | 108 | ||
109 | "@types/node@^8.0.33": | 109 | "@types/node@^8.0.33": |
110 | version "8.0.33" | 110 | version "8.0.45" |
111 | resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.33.tgz#1126e94374014e54478092830704f6ea89df04cd" | 111 | resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.45.tgz#89fad82439d5624e1b5c6b42f0f5d85136dcdecc" |
112 | 112 | ||
113 | "@types/parse-torrent-file@*": | 113 | "@types/parse-torrent-file@*": |
114 | version "4.0.1" | 114 | version "4.0.1" |
@@ -884,8 +884,8 @@ babel-plugin-transform-strict-mode@^6.24.1: | |||
884 | babel-types "^6.24.1" | 884 | babel-types "^6.24.1" |
885 | 885 | ||
886 | babel-preset-env@^1.5.2: | 886 | babel-preset-env@^1.5.2: |
887 | version "1.6.0" | 887 | version "1.6.1" |
888 | resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.0.tgz#2de1c782a780a0a5d605d199c957596da43c44e4" | 888 | resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48" |
889 | dependencies: | 889 | dependencies: |
890 | babel-plugin-check-es2015-constants "^6.22.0" | 890 | babel-plugin-check-es2015-constants "^6.22.0" |
891 | babel-plugin-syntax-trailing-function-commas "^6.22.0" | 891 | babel-plugin-syntax-trailing-function-commas "^6.22.0" |
@@ -1977,6 +1977,12 @@ debug@2.6.8, debug@^2.0.0, debug@^2.1.0, debug@^2.1.1, debug@^2.1.3, debug@^2.2. | |||
1977 | dependencies: | 1977 | dependencies: |
1978 | ms "2.0.0" | 1978 | ms "2.0.0" |
1979 | 1979 | ||
1980 | debug@^3.1.0: | ||
1981 | version "3.1.0" | ||
1982 | resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" | ||
1983 | dependencies: | ||
1984 | ms "2.0.0" | ||
1985 | |||
1980 | decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: | 1986 | decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: |
1981 | version "1.2.0" | 1987 | version "1.2.0" |
1982 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" | 1988 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" |
@@ -5777,8 +5783,8 @@ resolve-from@^1.0.0: | |||
5777 | resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" | 5783 | resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" |
5778 | 5784 | ||
5779 | resolve-url-loader@^2.0.0: | 5785 | resolve-url-loader@^2.0.0: |
5780 | version "2.1.0" | 5786 | version "2.1.1" |
5781 | resolved "https://registry.yarnpkg.com/resolve-url-loader/-/resolve-url-loader-2.1.0.tgz#27c95cc16a4353923fdbdc2dbaf5eef22232c477" | 5787 | resolved "https://registry.yarnpkg.com/resolve-url-loader/-/resolve-url-loader-2.1.1.tgz#5354e87381aae348371e555172c50816708e6c1c" |
5782 | dependencies: | 5788 | dependencies: |
5783 | adjust-sourcemap-loader "^1.1.0" | 5789 | adjust-sourcemap-loader "^1.1.0" |
5784 | camelcase "^4.0.0" | 5790 | camelcase "^4.0.0" |
@@ -5870,8 +5876,8 @@ rx-lite@^3.1.2: | |||
5870 | resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" | 5876 | resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" |
5871 | 5877 | ||
5872 | rxjs@^5.4.2: | 5878 | rxjs@^5.4.2: |
5873 | version "5.4.3" | 5879 | version "5.5.0" |
5874 | resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.3.tgz#0758cddee6033d68e0fd53676f0f3596ce3d483f" | 5880 | resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.0.tgz#26d8f3866eb700e247e0728a147c3d628993d812" |
5875 | dependencies: | 5881 | dependencies: |
5876 | symbol-observable "^1.0.1" | 5882 | symbol-observable "^1.0.1" |
5877 | 5883 | ||
@@ -6716,10 +6722,14 @@ tsickle@^0.21.0: | |||
6716 | source-map "^0.5.6" | 6722 | source-map "^0.5.6" |
6717 | source-map-support "^0.4.2" | 6723 | source-map-support "^0.4.2" |
6718 | 6724 | ||
6719 | tslib@^1.0.0, tslib@^1.5.0, tslib@^1.7.1, tslib@~1.7.1: | 6725 | tslib@^1.0.0, tslib@^1.7.1, tslib@~1.7.1: |
6720 | version "1.7.1" | 6726 | version "1.7.1" |
6721 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec" | 6727 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec" |
6722 | 6728 | ||
6729 | tslib@^1.5.0: | ||
6730 | version "1.8.0" | ||
6731 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.8.0.tgz#dc604ebad64bcbf696d613da6c954aa0e7ea1eb6" | ||
6732 | |||
6723 | tslint-config-standard@^6.0.1: | 6733 | tslint-config-standard@^6.0.1: |
6724 | version "6.0.1" | 6734 | version "6.0.1" |
6725 | resolved "https://registry.yarnpkg.com/tslint-config-standard/-/tslint-config-standard-6.0.1.tgz#a04ba0a794759e877287056f549b081e47a56d6c" | 6735 | resolved "https://registry.yarnpkg.com/tslint-config-standard/-/tslint-config-standard-6.0.1.tgz#a04ba0a794759e877287056f549b081e47a56d6c" |
@@ -7049,8 +7059,8 @@ video.js@^5.19.2: | |||
7049 | xhr "2.2.2" | 7059 | xhr "2.2.2" |
7050 | 7060 | ||
7051 | video.js@^6.2.0: | 7061 | video.js@^6.2.0: |
7052 | version "6.3.2" | 7062 | version "6.3.3" |
7053 | resolved "https://registry.yarnpkg.com/video.js/-/video.js-6.3.2.tgz#53f7cd08e4219157e4053b795673c3a9fb3d3072" | 7063 | resolved "https://registry.yarnpkg.com/video.js/-/video.js-6.3.3.tgz#e91f9fbb18062d2fd8c0e162db96d95caf78e3d4" |
7054 | dependencies: | 7064 | dependencies: |
7055 | babel-runtime "^6.9.2" | 7065 | babel-runtime "^6.9.2" |
7056 | global "4.3.2" | 7066 | global "4.3.2" |
@@ -7152,8 +7162,8 @@ webpack-dev-middleware@^1.11.0: | |||
7152 | time-stamp "^2.0.0" | 7162 | time-stamp "^2.0.0" |
7153 | 7163 | ||
7154 | webpack-dev-server@^2.4.5: | 7164 | webpack-dev-server@^2.4.5: |
7155 | version "2.9.1" | 7165 | version "2.9.2" |
7156 | resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.1.tgz#7ac9320b61b00eb65b2109f15c82747fc5b93585" | 7166 | resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.2.tgz#0fbab915701d25a905a60e1e784df19727da800f" |
7157 | dependencies: | 7167 | dependencies: |
7158 | ansi-html "0.0.7" | 7168 | ansi-html "0.0.7" |
7159 | array-includes "^3.0.3" | 7169 | array-includes "^3.0.3" |
@@ -7216,8 +7226,8 @@ webpack-sources@^1.0.1: | |||
7216 | source-map "~0.5.3" | 7226 | source-map "~0.5.3" |
7217 | 7227 | ||
7218 | webpack@^3.3.0: | 7228 | webpack@^3.3.0: |
7219 | version "3.6.0" | 7229 | version "3.8.1" |
7220 | resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.6.0.tgz#a89a929fbee205d35a4fa2cc487be9cbec8898bc" | 7230 | resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.8.1.tgz#b16968a81100abe61608b0153c9159ef8bb2bd83" |
7221 | dependencies: | 7231 | dependencies: |
7222 | acorn "^5.0.0" | 7232 | acorn "^5.0.0" |
7223 | acorn-dynamic-import "^2.0.0" | 7233 | acorn-dynamic-import "^2.0.0" |
@@ -7253,8 +7263,8 @@ websocket-extensions@>=0.1.1: | |||
7253 | resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.1.tgz#76899499c184b6ef754377c2dbb0cd6cb55d29e7" | 7263 | resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.1.tgz#76899499c184b6ef754377c2dbb0cd6cb55d29e7" |
7254 | 7264 | ||
7255 | webtorrent@^0.98.0: | 7265 | webtorrent@^0.98.0: |
7256 | version "0.98.19" | 7266 | version "0.98.20" |
7257 | resolved "https://registry.yarnpkg.com/webtorrent/-/webtorrent-0.98.19.tgz#9ce15fe71ea12600aa85ee12a9793eac88087262" | 7267 | resolved "https://registry.yarnpkg.com/webtorrent/-/webtorrent-0.98.20.tgz#f335869185a64447b6fe730c3c66265620b8c14a" |
7258 | dependencies: | 7268 | dependencies: |
7259 | addr-to-ip-port "^1.4.2" | 7269 | addr-to-ip-port "^1.4.2" |
7260 | bitfield "^1.1.2" | 7270 | bitfield "^1.1.2" |
@@ -7262,14 +7272,14 @@ webtorrent@^0.98.0: | |||
7262 | bittorrent-protocol "^2.1.5" | 7272 | bittorrent-protocol "^2.1.5" |
7263 | chunk-store-stream "^2.0.2" | 7273 | chunk-store-stream "^2.0.2" |
7264 | create-torrent "^3.24.5" | 7274 | create-torrent "^3.24.5" |
7265 | debug "^2.2.0" | 7275 | debug "^3.1.0" |
7266 | end-of-stream "^1.1.0" | 7276 | end-of-stream "^1.1.0" |
7267 | fs-chunk-store "^1.6.2" | 7277 | fs-chunk-store "^1.6.2" |
7268 | immediate-chunk-store "^1.0.8" | 7278 | immediate-chunk-store "^1.0.8" |
7269 | inherits "^2.0.1" | 7279 | inherits "^2.0.1" |
7270 | load-ip-set "^1.2.7" | 7280 | load-ip-set "^1.2.7" |
7271 | memory-chunk-store "^1.2.0" | 7281 | memory-chunk-store "^1.2.0" |
7272 | mime "^1.3.4" | 7282 | mime "^1.4.1" |
7273 | multistream "^2.0.5" | 7283 | multistream "^2.0.5" |
7274 | package-json-versionify "^1.0.2" | 7284 | package-json-versionify "^1.0.2" |
7275 | parse-torrent "^5.8.0" | 7285 | parse-torrent "^5.8.0" |