Comments (3)
@daffl Hey David! Just curious if this bug was actually solved.
I am using feathers auk release, have a generated backend service i.e. default generated app.
the middleware/index.js is configured as documented :
'use strict';
const handler = require('feathers-errors/handler');
const notFound = require('./not-found-handler');
const logger = require('./logger');
module.exports = function() {
// Add your custom middleware here. Remember, that
// just like Express the order matters, so error
// handling middleware should go last.
const app = this;
app.use(notFound());
app.use(logger(app));
app.use(handler());
};
In the client I am working with React & have configured feathers-client as documented :
import io from 'socket.io-client';
import feathers from 'feathers-client';
import rx from 'feathers-reactive';
import RxJS from 'rxjs';
const apiHost = "ws://localhost:3030";
const socket = io(apiHost);
export const app = feathers()
.configure(feathers.socketio(socket))
.configure(rx(RxJS))
.configure(feathers.hooks())
.configure(feathers.authentication({ storage: window.localStorage }));
This is how I am calling a service
export function signup(app, email, password) {
const users = app.service('users');
return users.create({email, password})
.then((data, err) => data)
.catch((err) => {
console.log(err);
return;
});
}
The error is never a feathers-errors
object. It's always a stacktrace, saying validation failed & I have gone over the documentation looking for any specific error handling configuration with respect to socketio.
Please suggest if I am missing something obvious to make it work.
from socketio.
It should be. Error conversion is happening i https://github.com/feathersjs/feathers-socket-commons/blob/master/src/client.js#L77 using https://github.com/feathersjs/feathers-errors/blob/master/src/index.js#L206. How do you know it is not a feathers-errors
Error
object? It normally doesn't give much away by just using console.log
, you will have to call err.toJSON
to see all properties.
from socketio.
@daffl My bad. Thanks for the info, I guess I was hitting some other problem when I was trying to access err.errors & it was throwing undefined, but might for a different reason altogether
from socketio.
Related Issues (20)
- Options are not passed to socket-io HOT 2
- How to stop listening to socket server from client service HOT 5
- Updated from feathers-socketio to @feathersjs/socketio; error message HOT 1
- How to change 5000ms timeout? HOT 2
- My chat room sometimes the user's text has become????? HOT 2
- `yarn add @feathersjs/socketio` gets stuck HOT 2
- Connection closed before receiving a handshake response HOT 3
- User object missing in logout callback args under certain conditions HOT 7
- An in-range update of feathers-hooks is breaking the build 🚨
- Add Socket.io v2 support HOT 2
- An in-range update of mocha is breaking the build 🚨 HOT 1
- An in-range update of babel-core is breaking the build 🚨 HOT 1
- Connecting to sockets on a path HOT 1
- Maybe acting wrong please look into my test app HOT 1
- Connection closed before receiving a handshake response HOT 7
- An in-range update of babel-cli is breaking the build 🚨 HOT 2
- An in-range update of mocha is breaking the build 🚨 HOT 2
- Filter service updates by ID HOT 1
- Remote address IP is always undefined HOT 1
- feathers / graphql using REST / Sockets HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from socketio.