cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kklauder
New Member

Custom Error Message

Hello,

 

I am using a Custom API connection and I using Pacth to update my Datasource. When I get my errors returned by my custom API, it shows the whole data object in a JSON string with {} characters. I set my swagger file to return only the message from my innererror message object (see the swagger sturcture below). Is there a way to show only the message string of my embedded innerror error object in the toast popup? Or is there a way to parse the error object before it is shown in the toast popup?

 

patch:
tags:
- WOSV4
summary: Update entity in EntitySet WOS
operationId: WOSV4_PatchByWO_NUM
security:
- basicAuth: []
consumes:
- application/json
produces: []
parameters:
- name: WO_NUM
in: path
description: 'key: WO_NUM'
required: true
type: string
- name: EF_WO
in: body
description: The entity to patch
required: true
schema:
$ref: '#/definitions/EF_WO'
- name: $expand
in: query
description: Expands related entities inline.
required: false
type: string
- name: $select
in: query
description: Selects which properties to include in the response.
required: false
type: string
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Object'
default:
description: Unexpected error
schema:
$ref: '#/definitions/_Error'
deprecated: false

 

 

 

Object:
type: object
properties: {}
_Error:
type: object
properties:
error:
$ref: '#/definitions/_InError'
_InError:
type: object
properties:
innererror:
$ref: '#/definitions/_InnerError'
_InnerError:
type: object
properties:
message:
type: string

1 REPLY 1
v-micsh-msft
Community Support
Community Support

Hi @kklauder,

 

I am afraid currently it is no available for PowerApps to handle the error messages in details, please check the response from rgruian (PowerApp Staff) in the following thread:

Error handling with Custom API

If I have any misunderstandings, please let me know.

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,352)