[ 
https://issues.apache.org/jira/browse/NIFI-13329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17851163#comment-17851163
 ] 

Matt Gilman edited comment on NIFI-13329 at 5/31/24 4:55 PM:
-------------------------------------------------------------

So the error is happening while the data viewer is consuming the stream. Once 
this fails, subsequent attempts to re-read the stream fail. The stream is 
either accessing the flowfile from the content repo or consuming an http 
response in clustered mode. To be able to reread the http response, we'd need 
to hold the arbitrarily large content and is a bigger effort.

Would it make sense for this case to render an error message stating that the 
content does not match the mime type? Or there was an error in processing the 
content in formatted mode? The UI would render correctly and show Formatted 
mode with the message. The user could then change the mode to Original or Hex 
to see those views. It addresses the error page your seeing above. And I think 
this case is more uncommon. Defaulting to Formatted and having to manually 
change to Original when the content in the flowfile is wrong is less annoying 
for the user than defaulting to Original and having to manually change to 
Formatted when the content in the flowfile is correct.

We could consider alternative behaviors in the future as replacement of these 
data viewers is on the roadmap to continue modernizing the UIs.


was (Author: mcgilman):
So the error is happening while the data viewer is consuming the stream. Once 
this fails, subsequent attempts to re-read the stream fail. The stream is 
either accessing the flowfile from the content repo or consuming an http 
response in clustered mode. To be able to reread the http response, we'd need 
to hold the arbitrarily large content and is a bigger effort.

Would be make sense for this case to render an error message stating that the 
content does not match the mime type? Or there was an error in processing the 
content in formatted mode? The UI would render correctly and show Formatted 
mode with the message. The user could then change the mode to Original or Hex 
to see those views. It addresses the error page your seeing above. And I think 
this case is more uncommon. Defaulting to Formatted and having to manually 
change to Original when the content in the flowfile is wrong is less annoying 
for the user than defaulting to Original and having to manually change to 
Formatted when the content in the flowfile is correct.

We could consider alternative behaviors in the future as replacement of these 
data viewers is on the roadmap to continue modernizing the UIs.

> Fallback to raw viewer when formatted viewer fails
> --------------------------------------------------
>
>                 Key: NIFI-13329
>                 URL: https://issues.apache.org/jira/browse/NIFI-13329
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Pierre Villard
>            Priority: Major
>         Attachments: Screenshot 2024-05-30 at 11.19.23.png
>
>
> The formatted viewer (based on the mime.type attribute) recently became the 
> default. In case the MIME type is wrong, this would return an error when 
> opening the flowfile's content. It could be nice to catch the error and 
> fallback to the raw viewer.
> !Screenshot 2024-05-30 at 11.19.23.png|width=611,height=150!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to