web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Is this expected behav...
Power Automate
Unanswered

Is this expected behaviour - SQL Stored Procedure Fails but Flow Reports Success

(0) ShareShare
ReportReport
Posted on by

Hello Community,

 

Came across this and wasn't sure if it was expected behaviour. 

 

Situation: A cloud flow calls the 'Execute stored procedure (V2)'. The stored procedure itself encounters an error, e.g. statement error, data error (does not allow null, constraint violation), etc and fails, however the cloud flow reports that it ran successfully.

Expectation: The flow should fail and report the stored procedure error. With the example below, would be the SQL reported error of 'Divide by zero error encountered'.

 

To reproduce, a simple stored procedure:

 

 

CREATE PROC [dbo].uspZZZZtest02
AS
BEGIN
	
	SELECT 1 'StatementNumber', GETUTCDATE() 'CurrentServerTime'

	DECLARE @MyVal FLOAT
	SET @MyVal = 0.0/0.0 --Cause an error

	SELECT 2 'StatementNumber', GETUTCDATE() 'CurrentServerTime'
END
GO

 

 

 

Confirmation that flow ran successfully (but note no output):

 

JohnFreds_0-1709855317952.png

 

Thanks,

 

John

Categories:
  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at

    I think you could argue either way. The flow executed a SP and got something back. If the flow would have been unable to place the SP request that would be considered a failure of the flow.

     

    That there is no usable data in the SP return is arguably a different issue,  one that would potentially need to be caught by the subsequent flow actions.

     

    If this is important to you please consider raising a new idea (or voting for an existing one) at https://ideas.powerautomate.com/d365community/forum/086dd68e-597f-ec11-8d21-0022482e8f9f

  • Barret Profile Picture
    652 Most Valuable Professional on at

    As far as PA is concerned, and as IBendlin mentioned, this is not a failure. It successfully connected to SQL Server and executed a stored procedure. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 423

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 177

Last 30 days Overall leaderboard