Class ConferenceError
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
会议错误
会议插件中发生的错误。用法示例:
const conferenceError =
ConferenceDataService.newConferenceError().setConferenceErrorType(
ConferenceDataService.ConferenceErrorType.PERMANENT,
);
包含身份验证的示例:
const state = ScriptApp.newStateToken()
.withMethod('myLoginCallbackFunction')
.withTimeout(3600)
.createToken();
const authenticationUrl = `https://script.google.com/a/google.com/d/${
ScriptApp.getScriptId()}/usercallback?state=${state}`;
const conferenceError =
ConferenceDataService.newConferenceError()
.setConferenceErrorType(
ConferenceDataService.ConferenceErrorType.AUTHENTICATION,
)
.setAuthenticationUrl(authenticationUrl);
详细文档
setAuthenticationUrl(authenticationUrl)
如果错误类型为 AUTHENTICATION
,该插件必须提供一个回调到该插件的网址,以允许用户登录。此字段的长度上限为 1800 个字符。
参数
名称 | 类型 | 说明 |
authenticationUrl | String | 要设置的身份验证网址。 |
返回
ConferenceError
- this 对象,用于链式调用
抛出
Error
- 如果提供的网址不是有效的 http/https 网址或过长。
setConferenceErrorType(conferenceErrorType)
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-28。
[null,null,["最后更新时间 (UTC):2025-07-28。"],[[["\u003cp\u003e\u003ccode\u003eConferenceError\u003c/code\u003e objects represent errors that occur within conferencing add-ons and can be created using \u003ccode\u003eConferenceDataService.newConferenceError()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThese errors have a type, which can be set using \u003ccode\u003esetConferenceErrorType()\u003c/code\u003e, and may require an authentication URL if the type is \u003ccode\u003eAUTHENTICATION\u003c/code\u003e, set using \u003ccode\u003esetAuthenticationUrl()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIf the error type is \u003ccode\u003eAUTHENTICATION\u003c/code\u003e, the provided authentication URL should redirect users back to the add-on for login purposes and should be a valid http/https URL with a maximum length of 1800 characters.\u003c/p\u003e\n"],["\u003cp\u003eBoth \u003ccode\u003esetAuthenticationUrl()\u003c/code\u003e and \u003ccode\u003esetConferenceErrorType()\u003c/code\u003e return the \u003ccode\u003eConferenceError\u003c/code\u003e object itself, enabling method chaining for easier error configuration.\u003c/p\u003e\n"]]],[],null,["# Class ConferenceError\n\nConferenceError\n\nError that occurred in a conferencing add-on. Example usage:\n\n```javascript\nconst conferenceError =\n ConferenceDataService.newConferenceError().setConferenceErrorType(\n ConferenceDataService.ConferenceErrorType.PERMANENT,\n );\n```\nExample with authentication: \n\n```javascript\nconst state = ScriptApp.newStateToken()\n .withMethod('myLoginCallbackFunction')\n .withTimeout(3600)\n .createToken();\n\nconst authenticationUrl = `https://script.google.com/a/google.com/d/${\n ScriptApp.getScriptId()}/usercallback?state=${state}`;\n\nconst conferenceError =\n ConferenceDataService.newConferenceError()\n .setConferenceErrorType(\n ConferenceDataService.ConferenceErrorType.AUTHENTICATION,\n )\n .setAuthenticationUrl(authenticationUrl);\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------------------------------------------------------------------|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [setAuthenticationUrl(authenticationUrl)](#setAuthenticationUrl(String)) | [ConferenceError](#) | If the error type is [AUTHENTICATION](/apps-script/reference/conference-data/conference-error-type#AUTHENTICATION), the add-on must provide a URL calling back into the add-on to allow users to log in. |\n| [setConferenceErrorType(conferenceErrorType)](#setConferenceErrorType(ConferenceErrorType)) | [ConferenceError](#) | Sets the error type of this [ConferenceError](#). |\n\nDetailed documentation\n----------------------\n\n### `set``Authentication``Url(authenticationUrl)`\n\nIf the error type is [AUTHENTICATION](/apps-script/reference/conference-data/conference-error-type#AUTHENTICATION), the add-on must\nprovide a URL calling back into the add-on to allow users to log in. The maximum length for\nthis field is 1800 characters.\n\n#### Parameters\n\n| Name | Type | Description |\n|-----------------------|----------|--------------------------------|\n| `authentication``Url` | `String` | The authentication URL to set. |\n\n#### Return\n\n\n[ConferenceError](#) --- this object, for chaining\n\n#### Throws\n\n\n[`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) --- if the provided URL is not a valid http/https URL or is too\nlong.\n\n*** ** * ** ***\n\n### `set``Conference``Error``Type(conferenceErrorType)`\n\nSets the error type of this [ConferenceError](#).\n\n#### Parameters\n\n| Name | Type | Description |\n|---------------------------|-------------------------------------------------------------------------------------|---------------------------|\n| `conference``Error``Type` | [ConferenceErrorType](/apps-script/reference/conference-data/conference-error-type) | The type of error to set. |\n\n#### Return\n\n\n[ConferenceError](#) --- this object, for chaining"]]