app/cyclid/plugins/api/github/push.rb in cyclid-0.3.3 vs app/cyclid/plugins/api/github/push.rb in cyclid-0.4.0

- old
+ new

@@ -102,9 +102,26 @@ github_ref: push_ref, github_comment: push_head_commit['message'] } callback = GithubCallback.new(auth_token, push_repository, push_sha, linkback_url) job_from_definition(job_definition, callback, ctx) + rescue NotFoundError + @client.create_status(pr_repository, pr_sha, 'error', + context: 'Cyclid', + description: 'The Organization does not exist') + + return_failure(404, 'organization does not exist') + rescue InvalidObjectError + @client.create_status(pr_repository, pr_sha, 'error', + context: 'Cyclid', + description: 'The Job definition contains errors') + + return_failure(400, 'job definition contains errors') + rescue InternalError + @client.create_status(pr_repository, pr_sha, 'error', + context: 'Cyclid', description: 'An Internal Error occurred') + + return_failure(4500, "internal error: #{ex}") rescue StandardError @client.create_status(push_repository, push_sha, 'error', context: 'Cyclid', description: 'An unknown error occurred') return_failure(500, 'job failed')