ResourceNotFoundError returns an error indicating that a resource being read could not be found.
(uri string)
| 40 | // ResourceNotFoundError returns an error indicating that a resource being read could |
| 41 | // not be found. |
| 42 | func ResourceNotFoundError(uri string) error { |
| 43 | return &jsonrpc.Error{ |
| 44 | Code: CodeResourceNotFound, |
| 45 | Message: "Resource not found", |
| 46 | Data: json.RawMessage(fmt.Sprintf(`{"uri":%q}`, uri)), |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | // readFileResource reads from the filesystem at a URI relative to dirFilepath, respecting |
| 51 | // the roots. |
no outgoing calls
searching dependent graphs…