Skip to content

Commit a1b01b2

Browse files
committed
Fix validation function name inconsistencies
1 parent e1a1ab5 commit a1b01b2

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

app/actions/route_create.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ def route_resource_manager
6868
end
6969

7070
def validation_error!(error, host, path, port, space, domain)
71-
check_domain_errors!(error, space, domain)
72-
check_quota_errors!(error, space)
73-
check_route_errors!(error)
71+
validation_error_domain!(error, space, domain)
72+
validation_error_quota!(error, space)
73+
validation_error_route!(error)
7474
validation_error_routing_api!(error)
7575
validation_error_host!(error, host, domain)
7676
validation_error_path!(error, host, path, domain)
@@ -79,20 +79,20 @@ def validation_error!(error, host, path, port, space, domain)
7979
error!(error.message)
8080
end
8181

82-
def check_domain_errors!(error, space, domain)
82+
def validation_error_domain!(error, space, domain)
8383
return unless error.errors.on(:domain)&.include?(:invalid_relation)
8484

8585
error!("Invalid domain. Domain '#{domain.name}' is not available in organization '#{space.organization.name}'.")
8686
end
8787

88-
def check_quota_errors!(error, space)
88+
def validation_error_quota!(error, space)
8989
error!("Routes quota exceeded for space '#{space.name}'.") if error.errors.on(:space)&.include?(:total_routes_exceeded)
9090
error!("Reserved route ports quota exceeded for space '#{space.name}'.") if error.errors.on(:space)&.include?(:total_reserved_route_ports_exceeded)
9191
error!("Routes quota exceeded for organization '#{space.organization.name}'.") if error.errors.on(:organization)&.include?(:total_routes_exceeded)
9292
error!("Reserved route ports quota exceeded for organization '#{space.organization.name}'.") if error.errors.on(:organization)&.include?(:total_reserved_route_ports_exceeded)
9393
end
9494

95-
def check_route_errors!(error)
95+
def validation_error_route!(error)
9696
return unless error.errors.on(:route)&.include?(:hash_header_missing)
9797

9898
error!('Hash header must be present when loadbalancing is set to hash')

0 commit comments

Comments
 (0)