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
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,590)