HttpErrorResponse : statusText: 'Unknown Error'

Kong version : 0.14.1

Kong API gateway is working perfectly. But when we are trying it wish postman it is not responding. it is not giving error.

Also we are working with Angular 8. We have implemented SSR. So also api calling is not working in SSR. It is giving me following error

ERROR { TypeError: Converting circular structure to JSON
at JSON.stringify ()
at readableObjectToString (/project/dist/server.js:841:63)
at resolvePromise (/project/dist/server.js:1003:69)
at resolvePromise (/project/dist/server.js:960:17)
at /project/dist/server.js:1064:17
at ZoneDelegate.invokeTask (/project/dist/server.js:574:31)
at Object.onInvokeTask (/project/dist/server/main.js:72998:33)
at ZoneDelegate.invokeTask (/project/dist/server.js:573:60)
at Zone.runTask (/project/dist/server.js:346:47)
at drainMicroTaskQueue (/project/dist/server.js:752:35)
rejection:
HttpErrorResponse {
headers: HttpHeaders { normalizedNames: Map {}, lazyUpdate: null, headers: Map {} },
status: 0,
statusText: ‘Unknown Error’,
url: ‘https://example.com:8443/project/getmenu’,
ok: false,
name: ‘HttpErrorResponse’,
message: ‘Http failure response for https://example.com:8443/project/getmenu: 0 Unknown Error’,
error:
ProgressEvent {
type: ‘error’,
target: [Object],
currentTarget: [Object],
lengthComputable: false,
loaded: 0,
total: 0 } },
promise:
ZoneAwarePromise {
__zone_symbol__state: 0,
__zone_symbol__value:
HttpErrorResponse {
headers: [Object],
status: 0,
statusText: ‘Unknown Error’,
url: ‘https://example.com:8443/project/getmenu’,
ok: false,
name: ‘HttpErrorResponse’,
message: ‘Http failure response for https://example.com:8443/project/getmenu: 0 Unknown Error’,
error: [Object] } },
zone:
Zone {
_parent:
Zone {
_parent: null,
_name: ‘’,
_properties: {},
_zoneDelegate: [Object] },
_name: ‘angular’,
_properties: { isAngularZone: true },
_zoneDelegate:
ZoneDelegate {
_taskCounts: [Object],
zone: [Circular],
_parentDelegate: [Object],
_forkZS: null,
_forkDlgt: null,
_forkCurrZone: [Object],
_interceptZS: null,
_interceptDlgt: null,
_interceptCurrZone: [Object],
_invokeZS: [Object],
_invokeDlgt: [Object],
_invokeCurrZone: [Circular],
_handleErrorZS: [Object],
_handleErrorDlgt: [Object],
_handleErrorCurrZone: [Circular],
_scheduleTaskZS: [Object],
_scheduleTaskDlgt: [Object],
_scheduleTaskCurrZone: [Circular],
_invokeTaskZS: [Object],
_invokeTaskDlgt: [Object],
_invokeTaskCurrZone: [Circular],
_cancelTaskZS: [Object],
_cancelTaskDlgt: [Object],
_cancelTaskCurrZone: [Circular],
_hasTaskZS: [Object],
_hasTaskDlgt: [Object],
_hasTaskDlgtOwner: [Circular],
_hasTaskCurrZone: [Circular] } },
task:
ZoneTask {
_zone:
Zone {
_parent: [Object],
_name: ‘angular’,
_properties: [Object],
_zoneDelegate: [Object] },
runCount: 0,
_zoneDelegates: null,
_state: ‘notScheduled’,
type: ‘microTask’,
source: ‘Promise.then’,
data: ZoneAwarePromise { _zone_symbol__state: 0, _zone_symbol__value: [Object] },
scheduleFn: undefined,
cancelFn: undefined,
callback: [Function],
invoke: [Function] } }

is this the real url that you use in your program? or did you by any chance add a custom hostname resolution of example.com to point to your kong listen address?

Thanks a lot for your reply.

No it is not real url.

We can not share live url with anyone.

Regards,

Nirali Shah

i see,

Can you share kong’s log when the request is sent?

Hello,

We are getting below error in postman, can you please check ?

Error: unable to verify the first certificate
Request Headers:
cache-control:“no-cache”
Postman-Token:“479c4b6d-d67e-4d18-b908-dbb026cd1eeb”

Thanks and Regards,

Nirali Shah

That looks like a certificate error. Have you configure a correct certificate and sni entity to kong?


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ