We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9d9022 commit 9b78ba3Copy full SHA for 9b78ba3
plugin.js
@@ -18,7 +18,16 @@ const APPLICATION_JSON = 'application/json'
18
class RequestWrapper {
19
constructor(request) {
20
this.request = request
21
- this.url = new URL(request.getUrl())
+
22
+ const url = request.getUrl()
23
24
+ if (!url) throw new Error('No URL specified')
25
26
+ try {
27
+ this.url = new URL(url)
28
+ } catch (error) {
29
+ throw new Error(`Invalid URL specified: ${url}`)
30
+ }
31
32
for (const parameter of request.getParameters()) {
33
this.url.searchParams.append(parameter.name, parameter.value)
0 commit comments