fail nicely when not able to figure out endpoint

This commit is contained in:
Konstantin Haase 2015-01-14 17:06:25 +01:00
parent 7d5d6b578c
commit a42afd5180

View File

@ -19,6 +19,7 @@ class Travis::Api::App
return @endpoint if defined? @endpoint and @endpoint
return unless headers['X-Pattern'].present? and headers['X-Endpoint'].present?
@endpoint = Object.const_get(headers['X-Endpoint']).prefix + headers['X-Pattern']
rescue NameError
end
end
end