Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

241 B
Raw Blame
import { isObject } from './object';

export function getErrorStatus(error: unknown): number | undefined {
  if (isObject(error) && 'status' in error && typeof error.status === 'number') {
    return error.status;
  }

  return undefined;
}