Skip to content

Commit

Permalink
rename the message code
Browse files Browse the repository at this point in the history
  • Loading branch information
aubin-tchoi committed Jan 10, 2025
1 parent ceae393 commit 90a130c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion connectors/src/api/update_connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const _postConnectorUpdateAPIHandler = async (
message: updateRes.error.message,
},
});
case "USER_NOT_ADMIN":
case "CONNECTOR_OAUTH_USER_MISSING_RIGHTS":
return apiError(req, res, {
status_code: 401,
api_error: {
Expand Down
2 changes: 1 addition & 1 deletion connectors/src/connectors/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type CreateConnectorErrorCode = "INVALID_CONFIGURATION";
export type UpdateConnectorErrorCode =
| "INVALID_CONFIGURATION"
| "CONNECTOR_OAUTH_TARGET_MISMATCH"
| "USER_NOT_ADMIN";
| "CONNECTOR_OAUTH_USER_MISSING_RIGHTS";

export type RetrievePermissionsErrorCode =
| "INVALID_PARENT_INTERNAL_ID"
Expand Down
2 changes: 1 addition & 1 deletion connectors/src/connectors/zendesk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export class ZendeskConnectorManager extends BaseConnectorManager<null> {
if (!isUserAdmin(zendeskUser)) {
return new Err(
new ConnectorManagerError(
"USER_NOT_ADMIN",
"CONNECTOR_OAUTH_USER_MISSING_RIGHTS",
"New authenticated user is not an admin"
)
);
Expand Down

0 comments on commit 90a130c

Please sign in to comment.