Skip to content

Commit 043e0ed

Browse files
authored
Avoid printing messages to the console. (#365)
1 parent 44cc358 commit 043e0ed

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ GitHub.dart is committed to efficiency as much as possible. If your code is not
3030

3131
Pull Request rejections are not a bad thing. It just means you need to fix something. Perhaps it is important to define 'rejection' as it is used in this case. A rejection is when a GitHub.dart committer comments on a Pull Request with a comment like 'rejected due to incorrect formatting'.
3232

33+
## Tests
34+
35+
To run the complete test suite you will need to install
36+
`octokit/fixtures-server`.
37+
38+
```
39+
npm install --global @octokit/fixtures-server
40+
```
41+
42+
Tests can be run using `make test`, which will start up a local mock
43+
GitHub and execute tests against it using your localhost port 3000.
44+
3345
## Contacting Us
3446

3547
- IRC: `#directcode on irc.esper.net and irc.freenode.net`

lib/src/common/github.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ class GitHub {
433433
/// Internal method to handle status codes
434434
///
435435
Never handleStatusCode(http.Response response) {
436-
print(response.body);
437436
String? message = '';
438437
List<Map<String, String>>? errors;
439438
if (response.headers['content-type']!.contains('application/json')) {
@@ -450,7 +449,7 @@ class GitHub {
450449
}
451450
}
452451
} catch (ex) {
453-
print(ex);
452+
throw UnknownError(this, ex.toString());
454453
}
455454
}
456455
switch (response.statusCode) {

0 commit comments

Comments
 (0)