open-nomad/ui/app/utils/message-from-adapter-error.js

7 lines
209 B
JavaScript
Raw Normal View History

2018-08-15 22:18:38 +00:00
// Returns a single string based on the response the adapter received
export default function messageFromAdapterError(error) {
if (error.errors) {
return error.errors.mapBy('detail').join('\n\n');
}
}