question

Alaa Adel avatar image
Alaa Adel asked

Hiding console messages with JS SDK

I am using the Javascript SDK.

Sometimes I get error messages in the browser console. They contain nice details about the error. But for the users, I don't want them to read this data; specially that it might contain credentials and so on..

For example, in PlayFabClientAPI.js, line 131 in Chrome, there is this line:

reject(xhrResult);

Which shows the error in console. The error allows me to read the request data and see the player's email and password..etc.

I could comment the line of course and solve the problem! But I am asking if there is a "cleaner" way to hide these messages after development is done (i.e "Release mode") without messing with the SDK source files.

Thank you.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Alaa Adel avatar image Alaa Adel commented ·

It will also be hard to comment every single line of those...

0 Likes 0 ·

1 Answer

·
Rick Chen avatar image
Rick Chen answered

Currently, there is no “Release mode” you mentioned for JS SDK that hides the error messages. The reject function is in the SDK that is released. This helps developers to debug issues, if any. And normally, the users won’t open the developer console on their browser. Nevertheless, if you would like a JS SDK version that can hide those messages, you could post a thread in the Feature Request forum.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.