import com.messagebird.MessageBirdClient;
import com.messagebird.MessageBirdService;
import com.messagebird.MessageBirdServiceImpl;
import com.messagebird.exceptions.GeneralException;
import com.messagebird.exceptions.UnauthorizedException;

public class ExampleListPurchaseableNumbers {
    public static void main(String[] args) {
        if (args.length < 1) {
            System.out.println("Please specify your access key.");
            return;
        }
        // First create your service object
        final MessageBirdService wsr = new MessageBirdServiceImpl(args[0]);

        // Add the service to the client
        final MessageBirdClient messageBirdClient = new MessageBirdClient(wsr);
        
        messageBirdClient.listNumbersForPurchase(args[1]);
        return;
        // try {
        // } catch (UnauthorizedException | GeneralException exception) {
        //     if (exception.getErrors() != null) {
        //         System.out.println(exception.getErrors().toString());
        //     }
        //     exception.printStackTrace();
        // }
    }
}
@@ -177,16 +177,69 @@
 eption;%0A
+import com.messagebird.exceptions.NotFoundException;%0A
 import c
@@ -287,16 +287,16 @@
 eption;%0A
-
 %0Apublic 
@@ -624,16 +624,51 @@
 (args%5B0%5D
+, %22https://numbers.messagebird.com%22
 );%0A%0A    
@@ -801,16 +801,53 @@
         
+try %7B%0A            System.out.println(
 messageB
@@ -887,18 +887,23 @@
 args%5B1%5D)
+)
 ;%0A
+    
         
@@ -921,28 +921,8 @@
     
- // try %7B%0A        //
  %7D c
@@ -968,16 +968,36 @@
 ception 
+%7C NotFoundException 
 exceptio
@@ -1004,27 +1004,24 @@
 n) %7B%0A       
- //
      if (exc
@@ -1053,27 +1053,24 @@
 l) %7B%0A       
- //
          Sys
@@ -1123,27 +1123,24 @@
 ());%0A       
- //
      %7D%0A     
@@ -1141,19 +1141,16 @@
 %0A       
- //
      exc
@@ -1182,19 +1182,16 @@
 %0A       
- //
  %7D%0A    %7D

improve example