Introduction: In this blog, we will understand how to customize and display a custom error message on PowerApps Portal.
You can enable custom errors on PowerApps portals to display a professional-looking page instead of YSOD. This page provides meaningful information if any exception occurs in the application.
Portal without custom error:
Portal with custom error:
NOTE: You must enable custom errors if it is not enabled users will not be able to see custom errors.
Steps to enable Custom error:
- Go to PowerApps Portal Admin Center
- Go to Portal Actions -> Enable custom errors
- Click on Enable
Steps to Customize the custom Error:
- Go to content Snippet
- Search for Portal Generic Error
- If “Portal Generic Error” record is not found, you must create New Content Snippet Record with below details
- Name: Portal Generic Error
- Display Name: Portal Generic Error
- Type: Text/HTML
- Type can be text or HTML based on your requirement you can choose.
- Value: If you select type as Text then the value will be visible add the text message which you want to show when an error occurs.
- Value (HTML): If you select type as HTML then the value (HTML) will be visible you can write HTML code for custom error messages as shown below.
Once you are done save the record. Now whenever error is thrown below screen will come: