[bugfix][xs] Text view when resource is missing fixed#189
Conversation
| item.resource.views[index].content = await fetchTextContent(item.resource.path) | ||
| } | ||
| } catch(error) { | ||
| item.resource.views[index].content = 'There is no data for this view type' |
There was a problem hiding this comment.
@gavram Maybe instead of content, sending it as errorMessage or failReason and then displaying it somehow different from a usual text view, so that it would be obvious to the user that this string is not the actual content, but an error warning?
Also, it's not certain here that there is no data, maybe there is data, but there was some other error that prevented from showing / fetching it. Maybe replacing it with something like 'Could not get data for this view'?
There was a problem hiding this comment.
@gavram I think saying "Could not get data for this view" is better as @EvgeniiaVak suggested. Could you change the message and we can get this PR merged?
|
@gavram is this going to be merged or can we close it? |
@EvgeniiaVak Please, can you review this?
This fixes a bug in text view when the resource is missing. In that case, the page which contains a text view can not be loaded.
You can test this with this resource on ODDK https://www.opendata.dk/viborg-kommune/naturfaciliteter-viborg
Thanks