You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@project.errors.add(attribute,"Your #{name} needs to return a 200 status. I got #{response.status}, is your code/website set to public!?!?")
144
+
end
145
+
146
+
147
+
# Copy pasted from https://github.com/hackclub/summer-of-making/blob/29e572dd6df70627d37f3718a6ebd4bafb07f4c7/app/controllers/projects_controller.rb#L275
@project.errors.add(attribute,"#{name} does not appear to be a valid repository or project URL")
184
+
end
185
+
end
186
+
187
+
rescueURI::InvalidURIError
188
+
@project.errors.add(attribute,"#{name} is not a valid URL")
189
+
rescueFaraday::ConnectionFailed=>e
190
+
@project.errors.add(attribute,"Please make sure the url is valid and reachable: #{e.message}")
191
+
rescueStandardError=>e
192
+
@project.errors.add(attribute,"#{name} could not be verified (idk why, pls let a admin know if this is happning alot and your sure that the url is valid): #{e.message}")
0 commit comments