File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ function getPsiUrl(url, env) {
48
48
*/
49
49
async function isDomainkeyValid ( domain , key ) {
50
50
if ( ! domain || ! key ) {
51
- throw new Error ( 'invalid domain or key' ) ;
51
+ throw new Error ( 'missing domain or key' ) ;
52
52
}
53
53
try {
54
54
const beurl = new URL ( `https://rum.fastly-aem.page/domains/${ domain } ` ) ;
@@ -62,11 +62,11 @@ async function isDomainkeyValid(domain, key) {
62
62
} ,
63
63
} ) ;
64
64
if ( ! beresp . ok ) {
65
- throw new Error ( 'invalid domain or key' ) ;
65
+ throw new Error ( 'unable to fetch from RUM Bundler API: ' + beresp . statusText ) ;
66
66
}
67
67
return true ;
68
68
} catch ( e ) {
69
- throw new Error ( 'invalid domain or key' , e ) ;
69
+ throw new Error ( 'other error validating domain key: ' + e . message ) ;
70
70
}
71
71
}
72
72
@@ -92,7 +92,7 @@ async function handleCorsRoute(req, env) {
92
92
return new Response ( '' , {
93
93
status : 404 ,
94
94
headers : {
95
- 'x-error' : 'not found' ,
95
+ 'x-error' : 'not found: ' + beresp . statusText ,
96
96
} ,
97
97
} ) ;
98
98
}
You can’t perform that action at this time.
0 commit comments