Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit 2483d0f

Browse files
committed
Replace "can not" with "cannot" in error messages
This allows us to be more consistent and grammatically intuitive in our errors. [#172562539]
1 parent 45a9d11 commit 2483d0f

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

app/actions/buildpack_update.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def validation_error!(error, message)
2828
error!(%{Stack '#{message.stack}' does not exist})
2929
end
3030
if error.errors.on(:stack)&.include?(:buildpack_cant_change_stacks)
31-
error!(%{Buildpack stack can not be changed})
31+
error!(%{Buildpack stack cannot be changed})
3232
end
3333
if error.errors.on(:stack)&.include?(:unique)
3434
error!(%{Buildpack with name '#{error.model.name}' and an unassigned stack already exists})

app/controllers/v3/domains_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def update_shared_orgs
122122

123123
shared_orgs = verify_shared_organizations_guids!(message, domain.owning_organization_guid)
124124

125-
unprocessable!('Domains can not be shared with other organizations unless they are scoped to an organization.') unless domain.private?
125+
unprocessable!('Domains cannot be shared with other organizations unless they are scoped to an organization.') unless domain.private?
126126

127127
DomainUpdateSharedOrgs.update(domain: domain, shared_organizations: shared_orgs)
128128
render status: :ok, json: Presenters::V3::DomainSharedOrgsPresenter.new(domain, visible_org_guids: permission_queryer.readable_org_guids)

app/messages/domain_create_message.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def alpha_numeric
7474

7575
def mutually_exclusive_organization_and_internal
7676
if requested?(:internal) && internal == true && requested?(:relationships)
77-
errors.add(:base, 'Can not associate an internal domain with an organization')
77+
errors.add(:base, 'Cannot associate an internal domain with an organization')
7878
end
7979
end
8080

lib/cloud_controller/resource_pool.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def resource_sizes(resources)
7474
def copy(descriptor, destination)
7575
if !resource_known?(descriptor)
7676
logger.warn 'resource_pool.sync.failed', unknown_resource: descriptor, destination: destination
77-
raise ArgumentError.new("Can not copy bits we do not have #{descriptor}")
77+
raise ArgumentError.new("Cannot copy bits we do not have #{descriptor}")
7878
end
7979

8080
logger.debug 'resource_pool.sync.start', resource: descriptor, destination: destination

spec/request/domains_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@
12391239
it 'returns a 422' do
12401240
post "/v3/domains/#{shared_domain.guid}/relationships/shared_organizations", params.to_json, user_header
12411241
expect(last_response.status).to eq(422)
1242-
expect(parsed_response['errors'][0]['detail']).to eq('Domains can not be shared with other organizations unless they are scoped to an organization.')
1242+
expect(parsed_response['errors'][0]['detail']).to eq('Domains cannot be shared with other organizations unless they are scoped to an organization.')
12431243
end
12441244
end
12451245

spec/unit/actions/buildpack_update_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ module VCAP::CloudController
116116
message = BuildpackUpdateMessage.new(stack: nil)
117117
expect {
118118
BuildpackUpdate.new.update(buildpack1, message)
119-
}.to raise_error(BuildpackUpdate::Error, 'Buildpack stack can not be changed')
119+
}.to raise_error(BuildpackUpdate::Error, 'Buildpack stack cannot be changed')
120120
end
121121
end
122122

spec/unit/messages/domain_create_message_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ module VCAP::CloudController
274274

275275
it 'should be invalid' do
276276
expect(subject).to_not be_valid
277-
expect(subject.errors[:base]).to include('Can not associate an internal domain with an organization')
277+
expect(subject.errors[:base]).to include('Cannot associate an internal domain with an organization')
278278
end
279279
end
280280

0 commit comments

Comments
 (0)