> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List all exception types

> Returns a list of all possible exception types for a porting order.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/porting-activation.yml get /porting_orders/exception_types
openapi: 3.1.0
info:
  title: Telnyx Porting Activation API
  version: 2.0.0
  description: API for porting activation jobs, exceptions, and sub requests.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /porting_orders/exception_types:
    get:
      tags:
        - Porting Orders
      summary: List all exception types
      description: Returns a list of all possible exception types for a porting order.
      operationId: ListExceptionTypes
      parameters: []
      responses:
        '200':
          $ref: '#/components/responses/ListPortingOrdersExceptionTypes'
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable entity. Check message field in response for details.
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.portingOrders.retrieveExceptionTypes();


            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            response = client.porting_orders.retrieve_exception_types()
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.PortingOrders.GetExceptionTypes(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.portingorders.PortingOrderRetrieveExceptionTypesParams;

            import
            com.telnyx.sdk.models.portingorders.PortingOrderRetrieveExceptionTypesResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    PortingOrderRetrieveExceptionTypesResponse response = client.portingOrders().retrieveExceptionTypes();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            response = telnyx.porting_orders.retrieve_exception_types

            puts(response)
        - lang: CLI
          source: |-
            telnyx porting-orders retrieve-exception-types \
              --api-key 'My API Key'
components:
  responses:
    ListPortingOrdersExceptionTypes:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/PortingOrdersExceptionType'
  schemas:
    PortingOrdersExceptionType:
      type: object
      properties:
        code:
          type: string
          description: Identifier of an exception type
          enum:
            - ACCOUNT_NUMBER_MISMATCH
            - AUTH_PERSON_MISMATCH
            - BTN_ATN_MISMATCH
            - ENTITY_NAME_MISMATCH
            - FOC_EXPIRED
            - FOC_REJECTED
            - LOCATION_MISMATCH
            - LSR_PENDING
            - MAIN_BTN_PORTING
            - OSP_IRRESPONSIVE
            - OTHER
            - PASSCODE_PIN_INVALID
            - PHONE_NUMBER_HAS_SPECIAL_FEATURE
            - PHONE_NUMBER_MISMATCH
            - PHONE_NUMBER_NOT_PORTABLE
            - PORT_TYPE_INCORRECT
            - PORTING_ORDER_SPLIT_REQUIRED
            - POSTAL_CODE_MISMATCH
            - RATE_CENTER_NOT_PORTABLE
            - SV_CONFLICT
            - SV_UNKNOWN_FAILURE
          example: ENTITY_NAME_MISMATCH
        description:
          type: string
          description: Description of an exception type
          example: Entity name does not match that on the CSR
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````