@@ -920,25 +920,31 @@ def generate_plot(search_by, filter_by, mode):
920920 except AttributeError as ae :
921921
922922 # Error Message from gnomAD
923- for msg in response .json ()["errors" ]:
924- st .error ("Error message from gnomAD for your process:\n \t " + msg ["message" ])
923+ if filter_by != 'rs_id' :
924+ try :
925+ for msg in response .json ()["errors" ]:
926+ st .error ("Errors from gnomAD for your process:\n \t " + msg ["message" ])
927+ except Exception as anyOtherException :
928+ pass
925929
926- # General Error Message
927- st .warning ("""
928- It might be caused since the search did not find a result from the database.
929- Try to check the `input` for `{}` or other `options`.
930- """ .format (filter_by ))
931-
932- # Technical Error Message
933- st .markdown ("""
934- > As a note, technical reason is `{}`.
935- >
936- > If you think this should not occur, you can contact with developer to issue this problem on Github page.
937- """ .format (ae ))
930+ # General Error Message
931+ st .warning ("""
932+ It might be caused since the search did not find a result from the database.
933+ Try to check the `input` for `{}` or other `options`.
934+ """ .format (filter_by ))
935+
936+ # Technical Error Message
937+ st .markdown ("""
938+ > As a note, technical reason is `{}`.
939+ >
940+ > If you think this should not occur, you can contact with developer to issue this problem on Github page.
941+ """ .format (ae ))
942+ else :
943+ pass
938944
939945 except (TypeError , KeyError ):
940946 try :
941947 for msg in response .json ()["errors" ]:
942948 st .error ("Errors from gnomAD for your process:\n \t " + msg ["message" ])
943- except :
949+ except Exception as anyOtherException :
944950 pass
0 commit comments