Add debug on user loading error.Add debug on user loading error.Add debug on user loading error.Add debug on user loading error.Add debug on user loading error.Add debug on user loading error.Add debug on user loading error.Add debug on user loading error.Add debug on user loading error.

This commit is contained in:
Paulo Gustavo Veiga 2022-03-07 19:10:09 -08:00
parent 0ae69e3176
commit 37adbde8d6

View File

@ -36,7 +36,7 @@ const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
const fetchResult = fetchMapById(mapId);
if (!fetchResult.isLoading) {
if (fetchResult.error) {
throw new Error(`User could not be loaded: ${JSON.stringify(fetchResult.error)} - ${fetchResult.error}`);
throw new Error(`User could not be loaded: ${JSON.stringify(fetchResult)}`);
}
result = fetchResult?.map?.role === 'owner' ? 'edition-owner' : 'edition-editor';
}