Error Handling and Show Error Message from API in Canvas App
Patch(
Tests,
Defaults(Tests),
{Text: "Power Apps Test"}
) Set(
varSearchResults,
CustomConnector.Search(
{SearchText: "Power Apps"}
)
)
IfError function is part of an experimental feature and are subject to change. That function is available only when the Formula-level error management experimental feature in Settings > Upcoming features > Experimental is turned on. (Yes, you read it right. It is still an *experimental* feature after more than 4 years and counting.)
IfError(,
Patch(
Tests,
Defaults(Tests),
{Text: "Power Apps Test"}
)
Notify(
"There is an error while creating a row in Test table.",
NotificationType.Error,
5000
),
false
);
IfError(,
Patch(
Tests,
Defaults(Tests),
{Text: "Power Apps Test"}
)
Notify(
FirstError.Details.HttpResponse,
NotificationType.Error,
5000
),
false
);
IfError(,
Patch(
Tests,
Defaults(Tests),
{Text: "Power Apps Test"}
)
Notify(
Match(
FirstError.Details.HttpResponse,
"\""code"":""(?<code>[^""]*)"",""message"":""(?<message>[^""]*)"
).message,
NotificationType.Error,
5000
),
false
);
Set(varSearchResults, Blank());
Set(varMessage, "Loading...");
Set(
varSearchResults,
IfError(
CustomConnector.Search(
{SearchText: "Power Apps"}
),
Set(
varMessage,
Match(
FirstError.Details.HttpResponse,
"\""code"":""(?<code>[^""]*)"",""message"":""(?<message>[^""]*)"
).message
),
If (
(CountRows(varSearchResults) > 0),
Set(varMessage, ""),
Set(varMessage, "No data available"});
);
);
);
Summary
Published on:
Learn moreRelated posts
Power Apps – Deprecation of Preview Copilot Controls in Canvas Apps
Starting on February 2, 2026, the following preview Copilot features in Power Apps Canvas Apps will be removed: Copilot Control: Add a Copilot...
Power Apps Grid Container: A Better Way to Build Responsive Canvas Apps
Microsoft is always rolling out updates to improve the Dynamics and Power Apps experience. Recently, Microsoft introduced Grid Containers in P...
Power Platform – New data request metrics for Power Platform Monitor and Power Apps Monitor for canvas apps
We are announcing two new operational-health metrics for Power Platform Monitor and Power Apps Monitor for canvas apps: Data Request Success R...
Power Apps – Deprecation of Maker Copilot in canvas apps
We are announcing the deprecation of the Edit your app with Copilot in Power Apps Studio (preview) in canvas apps. The deprecation will begin ...
Set Combo Box Value Dynamically by other Combo Box Value in Canvas APP
In this post You will come to know how to Set Default Selected Items of a Combo Box as per value selected in another Combo BOX. Problem Statem...
Power Apps – Create offline profiles in the maker studio for Canvas apps
We are announcing the ability to create offline profiles in the maker studio for Canvas apps in Power Apps. This feature will reach general av...
Power Apps – Create offline profiles in the maker studio for Canvas apps
We are announcing the ability to create offline profiles in the maker studio for Canvas apps in Power Apps. This feature will reach general av...
Power Apps – Manage your source code for canvas apps
We are announcing the ability to manage your source code for canvas apps in Power Apps. This feature will reach general availability on Septem...





