mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-18 22:48:23 +01:00
Better error
This commit is contained in:
1 parent
a657c32445
commit
b67ea29aff
2 files changed
+2
-2
No files matched your search
@@ -56,7 +56,7 @@ export async function getAuthorizationCode(
|
||||
try {
|
||||
authorizationUrl = new URL(`${authorizationUrlRaw ?? ''}`);
|
||||
} catch {
|
||||
throw new Error('Invalid authorization URL: ' + authorizationUrlRaw);
|
||||
throw new Error(`Invalid authorization URL "${authorizationUrlRaw}"`);
|
||||
}
|
||||
authorizationUrl.searchParams.set('response_type', 'code');
|
||||
authorizationUrl.searchParams.set('client_id', clientId);
|
||||
|
||||
@@ -35,7 +35,7 @@ export async function getImplicit(
|
||||
try {
|
||||
authorizationUrl = new URL(`${authorizationUrlRaw ?? ''}`);
|
||||
} catch {
|
||||
throw new Error('Invalid authorization URL: ' + authorizationUrlRaw);
|
||||
throw new Error(`Invalid authorization URL "${authorizationUrlRaw}"`);
|
||||
}
|
||||
authorizationUrl.searchParams.set('response_type', 'token');
|
||||
authorizationUrl.searchParams.set('client_id', clientId);
|
||||
|
||||
Reference in new issue
Block a user