Skip to content

Error feedback with custom protocol handler #1189

Closed
@Wortex17

Description

Is there any way we can send back errors with custom protocols?
E.g. when i access a file that doesn exists with the file:// protocoll, chrome does know the file does not exist (in the devConsole this is logged as net::ERR_FILE_NOT_FOUND)
With my custom foobar:// protocoll, i want to look up files, but trigger errors when specific (e.g. forbidden) files are accessed.

The only current way i can think of is redirecting the call to a file that does not exist for sure:

return new protocol.RequestFileJob('#');

but a specifically triggered error (event with "Forbiden" or "Access Denied" messages) would be much nicer.

I guess it shouldn't be hard to implement, as error feedback already exists here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions