File tree Expand file tree Collapse file tree 15 files changed +111
-14
lines changed Expand file tree Collapse file tree 15 files changed +111
-14
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ abstract class Base extends TestCase
79
79
'{"message":"Mock 500 error","code":500} ' ,
80
80
'This is a text error ' ,
81
81
'This is a text error ' ,
82
+ 'Invalid endpoint URL: htp://cloud.appwrite.io/v1 ' ,
83
+ '{"message":"Invalid endpoint URL: htp://cloud.appwrite.io/v1","code":0} ' ,
82
84
];
83
85
84
86
protected const REALTIME_RESPONSES = [
Original file line number Diff line number Diff line change @@ -169,6 +169,13 @@ class ServiceTest {
169
169
writeToFile(e.response)
170
170
}
171
171
172
+ try {
173
+ client.setEndpoint(" htp://cloud.appwrite.io/v1" )
174
+ } catch (e: AppwriteException ) {
175
+ writeToFile(e.message)
176
+ writeToFile(e.response)
177
+ }
178
+
172
179
delay(5000 )
173
180
writeToFile(realtimeResponse)
174
181
Original file line number Diff line number Diff line change @@ -147,6 +147,13 @@ class Tests: XCTestCase {
147
147
print ( error. response)
148
148
}
149
149
150
+ do {
151
+ try client. setEndpoint ( " htp://cloud.appwrite.io/v1 " )
152
+ } catch let error as AppwriteError {
153
+ print ( error. message)
154
+ print ( error. response)
155
+ }
156
+
150
157
wait ( for: [ expectation] , timeout: 10.0 )
151
158
print ( realtimeResponse)
152
159
Original file line number Diff line number Diff line change 1
- import '../lib/packageName.dart' ;
2
- import '../lib/models.dart' ;
1
+ import 'dart:convert' ;
2
+ import 'dart:io' ;
3
+
3
4
import '../lib/enums.dart' ;
5
+ import '../lib/models.dart' ;
6
+ import '../lib/packageName.dart' ;
4
7
import '../lib/src/input_file.dart' ;
5
8
6
- import 'dart:io' ;
7
- import 'dart:convert' ;
8
-
9
9
void main () async {
10
10
Client client = Client ().setSelfSigned ();
11
11
Foo foo = Foo (client);
@@ -109,11 +109,12 @@ void main() async {
109
109
print (e.response);
110
110
}
111
111
112
- // response = await general.setCookie();
113
- // print(response.result);
114
-
115
- // response = await general.getCookie();
116
- // print(response.result);
112
+ try {
113
+ await general.setEndpoint ("htp://cloud.appwrite.io/v1" );
114
+ } on AppwriteException catch (e) {
115
+ print (e.message);
116
+ print (e.response);
117
+ }
117
118
118
119
await general.empty ();
119
120
Original file line number Diff line number Diff line change @@ -135,6 +135,13 @@ async function start() {
135
135
console . log ( error . response ) ;
136
136
}
137
137
138
+ try {
139
+ await general . setEndpoint ( "htp://cloud.appwrite.io/v1" ) ;
140
+ } catch ( error ) {
141
+ console . log ( error . message ) ;
142
+ console . log ( error . response ) ;
143
+ }
144
+
138
145
await general . empty ( ) ;
139
146
140
147
const url = await general . oauth2 (
Original file line number Diff line number Diff line change @@ -114,6 +114,16 @@ public async Task Test1()
114
114
TestContext . WriteLine ( e . Response ) ;
115
115
}
116
116
117
+ try
118
+ {
119
+ await client . SetEndpoint ( "htp://cloud.appwrite.io/v1" ) ;
120
+ }
121
+ catch ( AppwriteException e )
122
+ {
123
+ TestContext . WriteLine ( e . Message ) ;
124
+ TestContext . WriteLine ( e . Response ) ;
125
+ }
126
+
117
127
await general . Empty ( ) ;
118
128
119
129
var url = await general . Oauth2 (
Original file line number Diff line number Diff line change
1
+ import 'dart:convert' ;
2
+ import 'dart:io' ;
3
+
1
4
import 'package:flutter/material.dart' ;
2
5
import 'package:path_provider_platform_interface/path_provider_platform_interface.dart' ;
3
6
4
- import '../lib/packageName.dart' ;
5
7
import '../lib/client_io.dart' ;
6
- import '../lib/models.dart' ;
7
8
import '../lib/enums.dart' ;
9
+ import '../lib/models.dart' ;
10
+ import '../lib/packageName.dart' ;
8
11
import '../lib/src/input_file.dart' ;
9
- import 'dart:io' ;
10
- import 'dart:convert' ;
11
12
12
13
class FakePathProvider extends PathProviderPlatform {
13
14
@override
@@ -138,6 +139,13 @@ void main() async {
138
139
print (e.response);
139
140
}
140
141
142
+ try {
143
+ await general.setEndpoint ("htp://cloud.appwrite.io/v1" );
144
+ } on AppwriteException catch (e) {
145
+ print (e.message);
146
+ print (e.response);
147
+ }
148
+
141
149
rtsub.stream.listen ((message) {
142
150
print (message.payload["response" ]);
143
151
rtsub.close ();
Original file line number Diff line number Diff line change @@ -136,6 +136,13 @@ class ServiceTest {
136
136
writeToFile(e.response)
137
137
}
138
138
139
+ try {
140
+ client.setEndpoint(" htp://cloud.appwrite.io/v1" )
141
+ } catch (e: AppwriteException ) {
142
+ writeToFile(e.message)
143
+ writeToFile(e.response)
144
+ }
145
+
139
146
general.empty()
140
147
141
148
val url = general.oauth2(
Original file line number Diff line number Diff line change @@ -109,6 +109,13 @@ async function start() {
109
109
console . log ( error . response ) ;
110
110
}
111
111
112
+ try {
113
+ response = await general . setEndpoint ( "htp://cloud.appwrite.io/v1" ) ;
114
+ } catch ( error ) {
115
+ console . log ( error . message ) ;
116
+ console . log ( error . response ) ;
117
+ }
118
+
112
119
await general . empty ( ) ;
113
120
114
121
const url = await general . oauth2 (
Original file line number Diff line number Diff line change 110
110
echo "{$ e ->getResponse ()}\n" ;
111
111
}
112
112
113
+ try {
114
+ $ response = $ general ->setEndpoint ("htp://cloud.appwrite.io/v1 " );
115
+ } catch (AppwriteException $ e ) {
116
+ echo "{$ e ->getMessage ()}\n" ;
117
+ echo "{$ e ->getResponse ()}\n" ;
118
+ }
119
+
113
120
$ general ->empty ();
114
121
115
122
$ url = $ general ->oauth2 (
You can’t perform that action at this time.
0 commit comments