Skip to content

Commit f78a1ef

Browse files
committed
make the message more clear when no auth_plugin_dir is set for the given auth_type
1 parent 2d9d52e commit f78a1ef

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/hooks/app/auth/auth.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def validate_auth!(payload, headers, endpoint_config, global_config = {})
5252
error!("failed to load custom auth plugin '#{auth_type}': #{e.message}", 500)
5353
end
5454
else
55-
error!("Custom validators not implemented in POC", 500)
55+
error!("unsupported auth type '#{auth_type}' due to auth_plugin_dir not being set", 400)
5656
end
5757
end
5858

spec/unit/lib/hooks/app/auth/auth_security_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def error!(message, code)
215215

216216
expect do
217217
instance.validate_auth!(payload, headers, endpoint_config)
218-
end.to raise_error(StandardError, /Custom validators not implemented/)
218+
end.to raise_error(StandardError, /unsupported auth type/)
219219
end
220220
end
221221
end

spec/unit/lib/hooks/app/auth/custom_auth_plugin_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def error!(message, code)
4444

4545
expect do
4646
instance.validate_auth!(payload, headers, endpoint_config, empty_global_config)
47-
end.to raise_error(StandardError, /Custom validators not implemented in POC/)
47+
end.to raise_error(StandardError, /unsupported auth type/)
4848
end
4949
end
5050

0 commit comments

Comments
 (0)