rust-lang / docs.rs

crates.io documentation generator
https://docs.rs
MIT License
956 stars 193 forks source link

Handle SizeLimit error #2506

Closed shusann01116 closed 1 month ago

shusann01116 commented 1 month ago

This solves #2481. Handle if AsyncStorage::fetch_source_file returnes SizeLimitReached error.

The message shown in the page will be like the screen shot.

image

shusann01116 commented 1 month ago

Thank you for the review! I've made changes as you mentioned.

Moved the warning to the right of the file list

The warning still sits on bottom of the file list if the viewport has small width as shown below.

image

Added a tiny test to ensure the message exists

I'm not sure, but I mocked a file has 50MB + 1Byte array to exceeds the default limit.

sentry-io[bot] commented 1 month ago

Sentry Issue: DOCS-RS-BACKEND-A9