Skip to content

NC | CLI | InvalidType Error | Replaced hard coded command types list with a dynamic list #8952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/manage_nsfs/manage_nsfs_cli_errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

const config = require('../../config');
const NoobaaEvent = require('../manage_nsfs/manage_nsfs_events_utils').NoobaaEvent;
const { TYPES } = require('../manage_nsfs/manage_nsfs_constants');

// by default NC_DISABLE_POSIX_MODE_ACCESS_CHECK=true, therefore CLI access check of account/bucket will be based on stat (open file)
// which checks only read permissions.
Expand Down Expand Up @@ -100,7 +101,7 @@ ManageCLIError.UnsetArgumentIsInvalid = Object.freeze({

ManageCLIError.InvalidType = Object.freeze({
code: 'InvalidType',
message: 'Invalid type, available types are account, bucket, logging, whitelist, upgrade, notification or connection.',
message: `Invalid type, valid types are ${Object.values(TYPES).join(', ')}.`,
http_code: 400,
});

Expand Down