Prettified Code!

This commit is contained in:
darrell-thobe-sp
2024-04-18 10:31:05 +00:00
committed by GitHub Action
parent f5b6aaf14f
commit 2cd5ccfc81
223 changed files with 40526 additions and 28073 deletions

View File

@@ -11,18 +11,17 @@ slug: /tools/ui-development-kit/error-handling
tags: ['UI', 'Error']
---
Ideally, everything in your custom UIs will work smoothly, but you will likely encounter errors at some point when you're implementing a page. If you provide an invalid filter or sorter, the list accounts endpoint will return a 400 error, for example.
You can handle this error by adding a `try catch` block to the server side of the accounts list page.
Ideally, everything in your custom UIs will work smoothly, but you will likely encounter errors at some point when you're implementing a page. If you provide an invalid filter or sorter, the list accounts endpoint will return a 400 error, for example. You can handle this error by adding a `try catch` block to the server side of the accounts list page.
If any of your backend calls result in a server error or bad request, you also want to handle those errors.
Read this guide to learn how to use the UI Development Kit to handle errors.
Read this guide to learn how to use the UI Development Kit to handle errors.
## 400 Bad Request
If you provide an invalid filter or sorter, the [List Accounts Endpoint](https://developer.sailpoint.com/docs/api/v3/list-accounts) returns a 400 error. This example awaits the response and doesn't exit the program when a 4xx level status is received. If a 4xx level status is received, the user is redirected to an error page.
Refer to this code block to learn how to implement error handling for invalid filters or sorters:
Refer to this code block to learn how to implement error handling for invalid filters or sorters:
```typescript
import {createConfiguration} from '$lib/sailpoint/sdk.js';
@@ -80,7 +79,7 @@ export const load = async ({url, locals}) => {
You can update the code block to handle more than just the 400 level statuses. You can see the highlighted code changes to handle any error response from the API call. You can send back an error to the user with the status, a detailed message, the details about the parameters used that caused the error, and the error response from the API.
Refer to this code block to learn how to implement error handling for other non-400 errors:
Refer to this code block to learn how to implement error handling for other non-400 errors:
```typescript
import {createConfiguration} from '$lib/sailpoint/sdk.js';
@@ -136,8 +135,8 @@ export const load = async ({url, locals}) => {
};
```
## Discuss
## Discuss
The most valuable resource for ISC developers is the SailPoint Developer Community itself, where ISC users and experts all over the world come together to ask questions and provide solutions.
The most valuable resource for ISC developers is the SailPoint Developer Community itself, where ISC users and experts all over the world come together to ask questions and provide solutions.
To learn more about the ISC UI Development Kit and discuss it with SailPoint Developer Community members, go to the [SailPoint Developer Community Forum](https://developer.sailpoint.com/discuss/c/identity-security-cloud/6).
To learn more about the ISC UI Development Kit and discuss it with SailPoint Developer Community members, go to the [SailPoint Developer Community Forum](https://developer.sailpoint.com/discuss/c/identity-security-cloud/6).

View File

@@ -5,7 +5,7 @@ pagination_label: UDK
sidebar_label: UI Development Kit
sidebar_position: 4
sidebar_class_name: rudk
keywords: ['UI', 'development','kit']
keywords: ['UI', 'development', 'kit']
description: Develop custom user interfaces.
slug: /tools/ui-development-kit
tags: ['UI']
@@ -41,11 +41,11 @@ git clone git@github.com:sailpoint-oss/ui-development-kit.git
This project is built on [Svelte-Kit](https://kit.svelte.dev/) and ultimately builds an [Electron](https://www.electronjs.org/) application.
Setting up the project is simple. The environment and application building process are configured so you can start creating custom UIs immediately. However, it is still helpful to understand the project structure.
Setting up the project is simple. The environment and application building process are configured so you can start creating custom UIs immediately. However, it is still helpful to understand the project structure.
Most of your activity will involve the `src` folder, such as adding new pages, routes, and sidebar items. You can learn more about these processes in [Getting Started](./getting-started.mdx).
Most of your activity will involve the `src` folder, such as adding new pages, routes, and sidebar items. You can learn more about these processes in [Getting Started](./getting-started.mdx).
This is the project structure:
This is the project structure:
```bash
.
@@ -73,7 +73,7 @@ This is the project structure:
## Run the application for local development
To run and develop the project locally, follow these steps:
To run and develop the project locally, follow these steps:
1. In the root of the project run this command to install dependencies:
@@ -89,10 +89,10 @@ npm run dev
## Get started
To start learning how to use the UI Development Kit and explore its possibilities, refer to [Getting Started](./getting-started.mdx).
To start learning how to use the UI Development Kit and explore its possibilities, refer to [Getting Started](./getting-started.mdx).
## Discuss
## Discuss
The most valuable resource for ISC developers is the SailPoint Developer Community itself, where ISC users and experts all over the world come together to ask questions and provide solutions.
The most valuable resource for ISC developers is the SailPoint Developer Community itself, where ISC users and experts all over the world come together to ask questions and provide solutions.
To learn more about the ISC UI Development Kit and discuss it with SailPoint Developer Community members, go to the [SailPoint Developer Community Forum](https://developer.sailpoint.com/discuss/c/identity-security-cloud/6).
To learn more about the ISC UI Development Kit and discuss it with SailPoint Developer Community members, go to the [SailPoint Developer Community Forum](https://developer.sailpoint.com/discuss/c/identity-security-cloud/6).