You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import Info from './info.class';
import hooks from './info.hooks';
export default function (app) {
app.use(
'/v1/info',
new Info({}, app)
);
const service = app.service('/v1/info');
service.hooks(hooks);
}
info.class.js :
import { MethodNotAllowed } from '@feathersjs/errors';
import fse from 'fs-extra';
class Info {
async setup(app) {
this.app = app;
}
async find() {
const { version } = await fse.readJson('./package-lock.json');
return { version };
}
async get()
{
throw new MethodNotAllowed();
}
}
export default Info;
Since I recently updated feathers to v5.x, calls to a service with HEAD method are throwing an error (500). curl --location --head 'http://localhost:12030/api/v1/info'
Expected behavior
To return a 200 code.
Actual behavior
Throwing a 500 error.
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working): 5.0.21
NodeJS version: 20.11.1
Operating System: Ubuntu 22.04.3
Module Loader: commonJs
The text was updated successfully, but these errors were encountered:
Hello,
Steps to reproduce
Create a simple service :
info.service.js
info.class.js :
curl --location --head 'http://localhost:12030/api/v1/info'
Expected behavior
To return a 200 code.
Actual behavior
Throwing a 500 error.
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working): 5.0.21
NodeJS version: 20.11.1
Operating System: Ubuntu 22.04.3
Module Loader: commonJs
The text was updated successfully, but these errors were encountered: