Skip to content

Commit

Permalink
Merge pull request #21256 from andijcr/fix/pandaproxy/spelling
Browse files Browse the repository at this point in the history
pandaproxy: fix spelling of `operation`
  • Loading branch information
michael-redpanda authored Jul 8, 2024
2 parents 17776b2 + 53a752d commit cb28b6a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/v/pandaproxy/error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ struct reply_error_category final : std::error_category {
return "Invalid compatibility level";
case reply_error_code::mode_invalid:
return "Invalid mode";
case reply_error_code::subject_version_operaton_not_permitted:
case reply_error_code::subject_version_operation_not_permitted:
return "Overwrite new schema is not permitted.";
case reply_error_code::subject_version_has_references:
return "One or more references exist to the schema";
Expand Down
2 changes: 1 addition & 1 deletion src/v/pandaproxy/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ enum class reply_error_code : uint16_t {
schema_version_invalid = 42202,
compatibility_level_invalid = 42203,
mode_invalid = 42204,
subject_version_operaton_not_permitted = 42205,
subject_version_operation_not_permitted = 42205,
subject_version_has_references = 42206,
subject_version_schema_id_already_exists = 42207,
write_collision = 50301,
Expand Down
6 changes: 3 additions & 3 deletions src/v/pandaproxy/schema_registry/error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct error_category final : std::error_category {
"configured";
case error_code::mode_not_found:
return "Subject does not have subject-level mode configured";
case error_code::subject_version_operaton_not_permitted:
case error_code::subject_version_operation_not_permitted:
return "Overwrite new schema is not permitted.";
case error_code::subject_version_has_references:
return "One or more references exist to the schema";
Expand Down Expand Up @@ -112,9 +112,9 @@ struct error_category final : std::error_category {
return reply_error_code::schema_empty; // 42201
case error_code::schema_version_invalid:
return reply_error_code::schema_version_invalid; // 42202
case error_code::subject_version_operaton_not_permitted:
case error_code::subject_version_operation_not_permitted:
return reply_error_code::
subject_version_operaton_not_permitted; // 42205
subject_version_operation_not_permitted; // 42205
case error_code::subject_version_has_references:
return reply_error_code::subject_version_has_references; // 42206
case error_code::subject_version_schema_id_already_exists:
Expand Down
2 changes: 1 addition & 1 deletion src/v/pandaproxy/schema_registry/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ enum class error_code {
subject_version_not_deleted,
compatibility_not_found,
mode_not_found,
subject_version_operaton_not_permitted,
subject_version_operation_not_permitted,
subject_version_has_references,
subject_version_schema_id_already_exists,
subject_schema_invalid,
Expand Down
4 changes: 2 additions & 2 deletions src/v/pandaproxy/schema_registry/errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ inline error_info mode_not_found(const subject& sub) {

inline error_info mode_not_readwrite(const subject& sub) {
return error_info{
error_code::subject_version_operaton_not_permitted,
error_code::subject_version_operation_not_permitted,
fmt::format("Subject {} is not in read-write mode", sub())};
}

inline error_info mode_is_readonly(const std::optional<subject>& sub) {
return error_info{
error_code::subject_version_operaton_not_permitted,
error_code::subject_version_operation_not_permitted,
fmt::format(
"Subject {} is in read-only mode", sub.value_or(subject{"null"}))};
}
Expand Down
2 changes: 1 addition & 1 deletion src/v/pandaproxy/schema_registry/store.h
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ class store {
result<void> check_mode_mutability(force f) const {
if (!_mutable && !f) {
return error_info{
error_code::subject_version_operaton_not_permitted,
error_code::subject_version_operation_not_permitted,
"Mode changes are not allowed"};
}
return outcome::success();
Expand Down

0 comments on commit cb28b6a

Please sign in to comment.