jeudi 23 juin 2016

Error calling custom API with EmberJS Adapters

I'm using JSONAPIAdapter with some customization to call my own API (developed in PlayFramework) but I get these errors:

vendor.js:9486 OPTIONS https://localhost:9000/0/calendar net::ERR_SSL_PROTOCOL_ERROR

vendor.js:38661 Error while processing route: calendars.index Ember Data Request GET https://localhost:9000/0/calendar returned a 0
Payload (Empty Content-Type)
 Error: Ember Data Request GET https://localhost:9000/0/calendar returned a 0
Payload (Empty Content-Type)

    at new Error (native)
    at Error.EmberError (http://localhost:4200/assets/vendor.js:26707:21)
    at Error.AdapterError (http://localhost:4200/assets/vendor.js:146849:16)
    at Class.handleResponse (http://localhost:4200/assets/vendor.js:148098:14)
    at Class.hash.error (http://localhost:4200/assets/vendor.js:148187:29)
    at fire (http://localhost:4200/assets/vendor.js:3498:31)
    at Object.fireWith [as rejectWith] (http://localhost:4200/assets/vendor.js:3628:7)
    at done (http://localhost:4200/assets/vendor.js:9070:14)
    at XMLHttpRequest.<anonymous> (http://localhost:4200/assets/vendor.js:9426:10)logError @ vendor.js:38661error @ vendor.js:38604triggerEvent @ vendor.js:38720trigger @ vendor.js:63599trigger @ vendor.js:63413(anonymous function) @ vendor.js:63233tryCatch @ vendor.js:63932invokeCallback @ vendor.js:63947publish @ vendor.js:63915publishRejection @ vendor.js:63850(anonymous function) @ vendor.js:42180invoke @ vendor.js:10459flush @ vendor.js:10523flush @ vendor.js:10331end @ vendor.js:10686run @ vendor.js:10808join @ vendor.js:10828run.join @ vendor.js:31307hash.error @ vendor.js:148190fire @ vendor.js:3498fireWith @ vendor.js:3628done @ vendor.js:9070(anonymous function) @ vendor.js:9426
vendor.js:42222 Error: Ember Data Request GET https://localhost:9000/0/calendar returned a 0
Payload (Empty Content-Type)

    at new Error (native)
    at Error.EmberError (http://localhost:4200/assets/vendor.js:26707:21)
    at Error.AdapterError (http://localhost:4200/assets/vendor.js:146849:16)
    at Class.handleResponse (http://localhost:4200/assets/vendor.js:148098:14)
    at Class.hash.error (http://localhost:4200/assets/vendor.js:148187:29)
    at fire (http://localhost:4200/assets/vendor.js:3498:31)
    at Object.fireWith [as rejectWith] (http://localhost:4200/assets/vendor.js:3628:7)
    at done (http://localhost:4200/assets/vendor.js:9070:14)
    at XMLHttpRequest.<anonymous> (http://localhost:4200/assets/vendor.js:9426:10)

When I enable mirage, I don't get any error.




Aucun commentaire:

Enregistrer un commentaire