Skip to content

return useful error if file is not readable #624

@dariok

Description

@dariok

For a file that cannot be read by the current user (e.g., guest), no useful error is returned but the following trace:

Something has gone wrong...
An unknown error has occurred: err:FODC0005
→ code
xs:QName
→ model → configuration → app-root
/db/apps/edoc
→ model → configuration → stop-on-error
true
→ model → configuration → param-resolver
templates:lookup-param-from-restserver#1
→ model → configuration → fn-resolver
#2
→ err:value
/db/apps/edoc/data/pa000333/texts/pa000333-4202.xml
→ err:description
Invalid argument to fn:doc or fn:doc-available. Permission denied to read + document: pa000333-4202.xml
→ err:additional
→ location
/db/apps/edoc/modules/app.xqm@291:36
→ user
xs:untypedAtomic

This should be a 404 or a 401

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions