Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protocol: adding error job to log error with custom protocols #1600

Merged
merged 2 commits into from
May 11, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
provide default error message
  • Loading branch information
deepak1556 committed May 11, 2015
commit 24bcd3b21e71cbc8d5eb7507271297478af6b4b2
3 changes: 2 additions & 1 deletion atom/browser/api/atom_api_protocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ class CustomProtocolRequestJob : public AdapterRequestJob {
GetWeakPtr(), path));
return;
} else if (name == "RequestErrorJob") {
int error;
// Default value net::ERR_NOT_IMPLEMENTED
int error = -11;
dict.Get("error", &error);

BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
Expand Down
3 changes: 2 additions & 1 deletion docs/api/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ Create a request job which sends a buffer as response.
* `code` Integer

Create a request job which sets appropriate network error message to console.
Code should be in the following range.
Default message is `net::ERR_NOT_IMPLEMENTED`. Code should be in the following
range.

* Ranges:
* 0- 99 System related errors
Expand Down