-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Labels
Description
When I have no permission to create hook, github server will return error message
{
message: Not Found,
documentation_url: https://developer.github.com/v3/repos/hooks/#create-a-hook
}
Can you throws NotFound
error here?
github.dart/lib/src/common/repos_service.dart
Lines 709 to 717 in 086f904
Future<Hook> createHook(RepositorySlug slug, CreateHook hook) async { | |
ArgumentError.checkNotNull(slug); | |
ArgumentError.checkNotNull(hook); | |
return github.postJSON<Map<String, dynamic>, Hook>( | |
'/repos/${slug.fullName}/hooks', | |
convert: (i) => Hook.fromJson(i)..repoName = slug.fullName, | |
body: jsonEncode(hook), | |
); | |
} |